Support the ongoing development of Laravel.io →
Requests Input

I have table that contain page value. I want to create dynamic route according to that value. So, i decide to create this route.

Route::get('{page}', 'PageController@check');

But, i have another page that have am-admin prefix.

Route::group(array('namespace' => 'Admin'), function() {
	Route::resource('am-admin/category', 'CategoryController');

	Route::resource('am-admin/post', 'PostController');
        ....
        ....
});

How to add an exception, so only routes that not contain am-admin will be execute run PageController@check.?

Thank you..

Last updated 3 years ago.
0

put your am-admin route before the catch all

0

Sign in to participate in this thread!

Eventy

Your banner here too?

fanjavaid fanjavaid Joined 13 Jul 2015

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.

© 2025 Laravel.io - All rights reserved.