laravel nullable parameter code example Example: laravel route optional parameter Route::get('/sample/{param?}', 'SampleController@index');