Laravel automatically resolves Eloquent models defined in routes or controller actions whose variable names match a route segment name. For example:
Route::get('api/users/{user}', function (App\User $user) {
return $user->email;
});
In this example, since the Eloquent $user variable de...