Commit b34c491f authored by Nicolas Widart's avatar Nicolas Widart

Adding route models

parent cbc361ec
<?php namespace Modules\Menu\Http\Controllers\Admin; <?php namespace Modules\Menu\Http\Controllers\Admin;
class MenuLinkController class MenuItemController
{ {
} }
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
use Illuminate\Routing\Router; use Illuminate\Routing\Router;
$router->model('menus', 'Modules\Menu\Entities\Menu');
$router->model('menuitem', 'Modules\Menu\Entities\Menuitem');
$router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin|permissions'], function(Router $router) $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin|permissions'], function(Router $router)
{ {
$router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Menu\Http\Controllers'], function(Router $router) $router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Menu\Http\Controllers'], function(Router $router)
...@@ -15,13 +18,13 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav ...@@ -15,13 +18,13 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav
'destroy' => 'dashboard.menu.destroy', 'destroy' => 'dashboard.menu.destroy',
]]); ]]);
$router->resource('menus.menulinks', 'Admin\MenuLinkController', ['except' => ['show'], 'names' => [ $router->resource('menus.menuitem', 'Admin\MenuItemController', ['except' => ['show'], 'names' => [
'index' => 'dashboard.menulink.index', 'index' => 'dashboard.menuitem.index',
'create' => 'dashboard.menulink.create', 'create' => 'dashboard.menuitem.create',
'store' => 'dashboard.menulink.store', 'store' => 'dashboard.menuitem.store',
'edit' => 'dashboard.menulink.edit', 'edit' => 'dashboard.menuitem.edit',
'update' => 'dashboard.menulink.update', 'update' => 'dashboard.menuitem.update',
'destroy' => 'dashboard.menulink.destroy', 'destroy' => 'dashboard.menuitem.destroy',
]]); ]]);
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment