dimanche 6 novembre 2016

Laravel 5.3: How do I map all urls under a prefix to one controller method?

I have a route group under a prefix admin:

Route::group(['prefix' => 'admin'], function(){
    Route::get('/', 'AdminController@method');
});

I would like a url such as /admin/dashboard/ and /admin/blogmanager/, basically, any arbitrary url under the admin prefix to be mapped to the same controller method without listing each url one by one. I would like a url pattern to accept all urls as long as it is prefixed by admin



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire