Route::get('user/{name?}', function ($name = null) { return $name; }); Route::get('user/{name?}', function ($name = 'John') { return $name; });
Route::get('/user/{active?}', 'UserController@getUsers');