Support the ongoing development of Laravel.io →
Requests Architecture
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.