hello I'm using laravel 5.4, and I would use a model binding in my routing. But I would use a controller function:
Route::get('/user/{id}', 'usersController@show');
But I would use a model binding so in my controller I would do something like:
public function show(Request $request, User $user){
dd($user->id)
}
But now $user->id is null because I don't know how binding model and use a controller function.
I tried with:
Route::model('user', 'User');
But It doesn't work.
Is it possible?