I have a route that has 3 optional variables declared as null in Controller
Route::get('gegonota/{gid?}/{cid?}/{nid?}', [
'uses' => 'GegonosController@index',
'as' => 'gegonota'
]);
and even i change the order of the parameter the problem still exists.
public function index($gid = null, $cid = null, $nid = null)
When values of the variables are null are not showing in the url like
http://localhost:8000/gegonota///1
and gives me route errors like it didnt find the specific url.
I have to check and substitute null to 0 so that has something in the url and give no error. Which is laravel way to do that avoiding all the trouble. thanks