I would like to know how to put a parameter in a Laravel controller method not obligatory, as I've got a route like this (I'm using the ? to say it's not obligatory):
Route::get('/account/student/create/{student_id?}', array(
'as' => 'account-student-create',
'uses' => 'StudentController@getCreate'
));
I've got in my controller:
getCreate($student_id){...}
Put if don't fill a parameter in the route I've got a warning message:
Missing argument 1 for StudentController::getCreate()
Thanks for helping!
Jean