@Snapey can you help me with this
Feb 3, 2022
5
Level 1
Route [pagedetails.update] not defined.
I have a form from where i update post content but its not working because here is a error of route not defined Here is my Route
Route::post('pagedetails/update',[PageController::class,'UpdatePage']);
Here is my Blade Template Form
<form role="form" action="{{ route('pagedetails.update') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="card-body">
<div class="form-group">
<label for="full_name">Full Name</label>
<input type="text" value="{{ $page->title }}" name="page_title" class="form-control" id="page_title" placeholder="Enter Your Full Name">
</div>
<div class="form-group">
<label for="exampleInputEmail1">Page content</label>
<textarea class="form-control validate[required] textarea-editor" name="description" id="description" placeholder="Content" rows="10" spellcheck="false">{{ $page->content }}</textarea>
</div>
</div>
<div class="card-footer">
<button type="submit" class="btn btn-primary">Update</button>
</div>
</form>
I have Post List Page where I can edit it through getting slug
Route::get('pagedetails/{slug}',[PageController::class,'DetailPage']);
Level 104
Name your route(s) with the name method which will solve
Route [pagedetails.update] not defined.
Route::post('pagedetails/update',[PageController::class,'UpdatePage'])->name('pagedetails.update');
How does the UpdatePage controller action know which record to modify?
Please or to participate in this conversation.