Laravel passing variables inside route accessing a named route

I am trying to pass 3 variables values inside an html link that uses route to access a named routed with this code:

<a href="{{ route('gegonota', ['gid' => $gid,'cid' => $cid , 'nid' => $nid]) }}">{{$nomos->name}}</a>

also the route function is

Route::get('gegonota/{gid?}/{cid?}/{nid?}', ['uses' => 'GegonosController@index', 'as' => 'gegonota']);

but it doesnt work right.
How can i do it.

Source: stackoverflow-php