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

Unable to open serial port using Putty to bluetooth device on windows 7 64 bit -

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

java - Getting exception in JDBC thin driver -