Commit 629fb75c authored by Nicolas Widart's avatar Nicolas Widart

Adding permissions

parent dac80072
......@@ -10,10 +10,10 @@ class SidebarViewComposer extends BaseSidebarViewComposer
$view->items->put('menus', [
'weight' => 7,
'request' => "*/$view->prefix/menu*",
'route' => 'dashboard.media.index',
'route' => 'dashboard.menu.index',
'icon-class' => 'fa fa-bars',
'title' => 'Menus',
'permission' => $this->auth->hasAccess('media.index')
'permission' => $this->auth->hasAccess('menu.index')
]);
}
}
<?php
return [
'menu' => [
'index',
'create',
'store',
'edit',
'update',
'destroy',
],
'menuitem' => [
'index',
'create',
'store',
'edit',
'update',
'destroy',
]
];
......@@ -4,5 +4,8 @@ use Modules\Core\Http\Controllers\Admin\AdminBaseController;
class MenuController extends AdminBaseController
{
public function index()
{
dd('index view');
}
}
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