Rute Laravel mengikat eksplisit
public function boot()
{
parent::boot();
Route::model('user', App\User::class);
}
Cooperative Crab
public function boot()
{
parent::boot();
Route::model('user', App\User::class);
}
Route::get('api/users/{user}', function (App\User $user) {
return $user->email;
});