Routes are matched in order, if a match is found then the matching will not continue. As a general rule the more specific a route is the higher it should be.
Route::get('admin', function()
{
return 'You are at the admin panel.';
});
Route::group(array('prefix' => '{country}'), function($country)
{
Route::get('/hello-world', function($country){
return "You are in the {$country} localisation.";
});
});
/admin
will return You are at the admin panel.
/uk/hello-world
will return You are in the uk localisation.
If this doesn't work you must have a problem elsewhere in your application.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community