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

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

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