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
Post a Comment