php - How to fork and splice route prefix? -


consider following:

route::group(array('prefix' => 'system'), function() {     route::resource('accounts', 'usercontroller');     route::resource('categories', 'categorycontroller');     route::resource('products', 'productcontroller'); } 

how fork system admin in way both work same?

you this:

$my_routes = function() {     route::resource('accounts', 'usercontroller');     route::resource('categories', 'categorycontroller');     route::resource('products', 'productcontroller'); };  route::group(array('prefix' => 'system'), $my_routes); route::group(array('prefix' => 'admin'), $my_routes); 

but don't think there built in way in laravel want. guess better question is, why want this?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -