Laravel newbie here, I want to create an update route in Laravel, without the resource controller. I have the route for the editing
Route::get('/indexedit','PagesController@indexedit')->middleware('user');
And in there, there is a form with the following
<form class="col s12" method="POST" action="indexedit/{{ $val->id }}" >
{{ method_field('PUT') }}
{{ csrf_field() }}
There are two input fields and a button for submiting. I created a route for the update which is
Route::post('indexedit/{$id}', 'PagesController@update');
But when I submit, it says Route not found. NotFoundHttpException in RouteCollection.php line 161: