<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <title>edit</title>
</head>
<body>

<center>
  <div class "container">
<h1>Edit</h1>
    <form method='post' action="{{ route('post.update', $id) }}" >
    <!-- {{csrf_field()}} -->
    <div class="form-group">
        @csrf
        <label class="label">Post Title: </label>
        <input type="text" name="title" class="form-control" value="{{$post->title}}" required/>
    <div class="form-group">
        <label class="label">Post Body: </label>
        <input name="body" rows="10" cols="30" class="form-control" value="{{$post->body}}" required></input>
    </div>
    <div class="form-group">
        <label class="label">Post Image: </label>
        <input type="file" name="image" class="form-control" value="{{$post->image}}" required/>
    </div>
    <div class="form-group">
        <input type="submit" class="btn btn-success" />
    </div>
  </div>
    <!-- <div class='form-group'>
        <h4>Title</h4>
        <input size="35" type="textarea" name="title" class="form-comtrol" placeholder="ยี่ห้อรถ" value="{{$post->title}}" /><br>
        <h4>Body</h4>
        <input row="4" cols="50" type="text" name="body" class="form-comtrol" placeholder="ราคา" value="{{$post->body}}" /><br>
        <h4>Image</h4>
        <input size="100" type="file" name="image" class="form-comtrol" placeholder="ลิ้งรูป"value="{{$post->image}}" /><br><br>
        <div><input type="submit" class="btn bnt-primary" value="อัพเดท" >
        </div>
        </form> -->
        </center>
</body>
</html>
