I am beginner of laravel 5.3 Now i am trying to edit user details
My routes:
Route::get('/Edit/{id}','RegistrationController@Edit');
View
<td>
{{ Html::link('/Edit', 'Edit', array('id' => $user->id,'class' =>'btn btn-info'), true)}}
</td>
Controller:
public function Edit($id)
{
echo $id;
}
When i click Edit button i get an error like 'NotFoundHttpException in RouteCollection.php line 161:'. What is wrong with me?Please help me
Your Error is that you are not passing id withedit route...
you have to do something like /Edit/{id}....
To do so one of the way is to use named route.
Since you are not passing the wild card i.e. $id in the link you are getting this error
In Route File Can you please Change to
And in View Change the Link to
Hope this helps you. Ask if any doubt