Exemplo n.º 1
0
 protected function registerMenu(DashboardMenu $dashboardMenu = null)
 {
     $settingsMenu = ['slug' => 'Settings', 'icon' => 'fa fa-cog', 'route' => route('dashboard.settings.index'), 'label' => trans('dashboard::menu.Constants'), 'groupname' => trans('dashboard::menu.General settings'), 'childs' => false, 'divider' => false];
     $localizationMenu = ['slug' => 'Localization', 'icon' => 'fa fa-language', 'route' => route('dashboard.language.index'), 'label' => trans('dashboard::menu.Localization'), 'groupname' => null, 'childs' => false, 'divider' => true];
     $errorMenu = ['slug' => 'Logs', 'icon' => 'fa fa-bug', 'route' => route('dashboard.log.index'), 'label' => trans('dashboard::menu.Logs'), 'groupname' => trans('dashboard::menu.Errors'), 'childs' => false, 'divider' => true];
     $seoMenu = ['slug' => 'Static pages', 'icon' => 'fa fa-list-alt', 'route' => route('dashboard.static.index'), 'label' => trans('dashboard::menu.Static pages'), 'groupname' => trans('dashboard::menu.Search Engine Optimization'), 'childs' => false, 'divider' => false];
     $siteMapMenu = ['slug' => 'Site Map', 'icon' => 'fa fa-sitemap', 'route' => route('dashboard.index'), 'label' => trans('dashboard::menu.Site Map'), 'childs' => false, 'divider' => true];
     $CRUDMenu = ['slug' => 'CRUD', 'icon' => 'fa fa-clone', 'route' => route('dashboard.crud.index'), 'label' => 'CRUD', 'childs' => false, 'divider' => false];
     $typePostMenu = ['slug' => 'Types posts', 'icon' => 'fa fa-pencil-square-o', 'route' => route('dashboard.types.index'), 'label' => trans('dashboard::menu.Types posts'), 'childs' => false, 'divider' => false];
     $categoryMenu = ['slug' => 'Categories', 'icon' => 'fa fa-briefcase', 'route' => route('dashboard.index'), 'label' => trans('dashboard::menu.Categories'), 'childs' => false, 'divider' => true];
     $EditorMenu = ['slug' => 'Editor', 'icon' => 'fa fa-code', 'route' => route('dashboard.editor.index'), 'label' => 'Редактор', 'childs' => false, 'divider' => true];
     $menuMenu = ['slug' => 'Menu', 'icon' => 'fa fa-bars', 'route' => route('dashboard.index'), 'label' => trans('dashboard::menu.Menu'), 'groupname' => trans('dashboard::menu.Posts Managements'), 'childs' => false, 'divider' => false];
     $usersMenu = ['slug' => 'Users', 'icon' => 'fa fa-users', 'route' => route('dashboard.users.index'), 'label' => trans('dashboard::menu.Users'), 'groupname' => trans('dashboard::menu.Users'), 'childs' => false, 'divider' => false];
     $groupsMenu = ['slug' => 'Groups', 'icon' => 'fa fa-lock', 'route' => route('dashboard.roles.index'), 'label' => trans('dashboard::menu.Groups'), 'childs' => false, 'divider' => true];
     $postMenu = ['slug' => 'Post', 'icon' => 'fa fa-pencil', 'route' => route('dashboard.index'), 'label' => trans('dashboard::menu.Common posts'), 'groupname' => trans('dashboard::menu.The interface and data'), 'childs' => true, 'divider' => false];
     $blocksMenu = ['slug' => 'Block', 'icon' => 'fa fa-cubes', 'route' => route('dashboard.index'), 'label' => trans('dashboard::menu.Common blocks'), 'childs' => true, 'divider' => true];
     $dashboardMenu->add('Posts', 'dashboard::partials.leftMenu', $postMenu, 1);
     $dashboardMenu->add('Posts', 'dashboard::partials.leftMenu', $blocksMenu, 2);
     $dashboardMenu->add('Tools', 'dashboard::partials.leftMenu', $menuMenu, 1);
     $dashboardMenu->add('Tools', 'dashboard::partials.leftMenu', $typePostMenu, 2);
     $dashboardMenu->add('Tools', 'dashboard::partials.leftMenu', $categoryMenu, 3);
     $dashboardMenu->add('Tools', 'dashboard::partials.leftMenu', $seoMenu, 10);
     $dashboardMenu->add('Tools', 'dashboard::partials.leftMenu', $siteMapMenu, 30);
     $dashboardMenu->add('Tools', 'dashboard::partials.leftMenu', $CRUDMenu, 40);
     $dashboardMenu->add('Tools', 'dashboard::partials.leftMenu', $EditorMenu, 50);
     $dashboardMenu->add('Systems', 'dashboard::partials.leftMenu', $errorMenu, 500);
     $dashboardMenu->add('Systems', 'dashboard::partials.leftMenu', $localizationMenu, 300);
     $dashboardMenu->add('Systems', 'dashboard::partials.leftMenu', $settingsMenu, 1);
     $dashboardMenu->add('Systems', 'dashboard::partials.leftMenu', $usersMenu, 501);
     $dashboardMenu->add('Systems', 'dashboard::partials.leftMenu', $groupsMenu, 601);
 }
 /**
  * Регистрация элементов меню.
  *
  * @param DashboardMenu|null $dashboardMenu
  */
 protected function registerMenu(DashboardMenu $dashboardMenu = null)
 {
     $panelMenu = ['slug' => 'Dashboard', 'icon' => 'fa fa-tachometer', 'route' => '#', 'label' => trans('dashboard::menu.Dashboard')];
     $postMenu = ['slug' => 'Posts', 'icon' => 'fa fa-pencil-square-o', 'route' => '#', 'label' => trans('dashboard::menu.Posts'), 'childs' => true];
     $toolsMenu = ['slug' => 'Tools', 'icon' => 'fa fa-wrench', 'route' => '#', 'label' => trans('dashboard::menu.Tools'), 'childs' => true];
     $systemsMenu = ['slug' => 'Systems', 'icon' => 'fa fa-cogs', 'route' => '#', 'label' => trans('dashboard::menu.Systems'), 'childs' => true];
     $dashboardMenu->add('leftMenu', 'dashboard::partials.leftMenu', $panelMenu, 1);
     $dashboardMenu->add('leftMenu', 'dashboard::partials.leftMenu', $postMenu, 100);
     $dashboardMenu->add('leftMenu', 'dashboard::partials.leftMenu', $toolsMenu, 500);
     $dashboardMenu->add('leftMenu', 'dashboard::partials.leftMenu', $systemsMenu, 1000);
 }