Initially, I created the following route (1st search):
Route::get('/buscar/profissoes/{city_id_slug?}', array('as' => 'neighborhoods.city',
'uses' => 'NeighborhoodsController@getIndexCity'));
Then the URL looks like this at the end:
http://example.com/buscar/profissoes/1-uberlandia
After, I created the second aroat (2nd search - continued)
Route::get('/buscar/profissionais/{city_id_slug}/{neighborhood_id_slug}/
{profession_id_slug}', array('as' => 'professionals.search', 'uses' => 'ProfessionalsController@getSearch'));
Then the URL should look like this:
http://example.com/buscar/profissionais/1-uberlandia/15-santa-monica/1-pedreiro
But since the above URL is generated dynamically, it does not initially have the last 2 parameters. They will be added when you click submit. Anyway, I added the parameters, just as test and did not work:
URL::route('professionals.search', array($city_id_slug, $city_id_slug, $city_id_slug))
Then Laravel returns the following:
Symfony \ Component \ Routing \ Exception \ RouteNotFoundException
Unable to generate a URL for the named route "http://example.com/buscar/profissionais/1-uberlandia/1-uberlandia/1-uberlandia" as such route does not exist.
What is the right way to do this? And what is wrong with my routes, that they are different, and that even forcing the last 2 parameters with the number 1, did not work?