Using Optional Parameters
When i use optional parameters in Laravel 5.4, i get the error internal error: failed to retrieve the default value. Here is My routes:
Route::group(['middleware' => ['auth','role:SUPER_ADMIN'],'prefix' => 'SWSM-Dashboard'], function () {
Route::get('/', 'HomeController@eventDashboard');
Route::group(['prefix' => '/providers'],function (){
Route::get('create/{providerData?}','ProvidersController@create');
Route::get('delete/{providerId?}','ProvidersController@destroy');
Route::get('/','ProvidersController@index');
});
});
Here is my controller function
public function create($providerData){ dd('Hello'); }
My middleware is just the standard Auth out of the box with Laravel so i'm surprised that this is not working.
via Jamie Ross