Route::get('/user/{name?}', function ($name = null) {
return $name;
});
Route::get('/user/{name?}', function ($name = 'John') {
return $name;
});
use IlluminateHttpRequest;
Route::get('/user/{id}', function (Request $request, $id) {
return 'User '.$id.' user';
});