I tried to update a post using edit route but when I send the form and use the update function give me an error
my code is
<form action="/posts{{$posts->id}}" method="POST">
@method('PUT')
@csrf
<label for="">title</label>
<input type="text" name="title" class="form-control" >
<label for="">body</label>
<textarea type="text" name="body" class="form-control">{{$post->body}}</textarea>
<input type="submit" class="btn btn-primary" value="edit">