src/Chronos/Scaffolding/ScaffoldingServiceProvider.php
protected function registerMenu()
    {
        \Menu::make('ChronosMenu', function($menu) {
//            $menu->add(trans('chronos.scaffolding::menu.Dashboard'), ['route' => 'chronos.dashboard'])
//                ->prepend('<span class="icon c4icon-dashboard"></span>')
//                ->data('order', 1)->data('permissions', ['view_dashboard']);


            // Users tab
            $users_menu = $menu->add(trans('chronos.scaffolding::menu.Users'), null)
                ->prepend('<span class="icon c4icon-user-3"></span>')
                ->data('order', 800)->data('permissions', ['view_roles', 'edit_permissions']);
            $users_menu->add(trans('chronos.scaffolding::menu.Roles'), ['route' => 'chronos.users.roles'])
                ->data('order', 810)->data('permissions', ['view_roles']);
            $users_menu->add(trans('chronos.scaffolding::menu.Permissions'), ['route' => 'chronos.users.permissions'])
                ->data('order', 820)->data('permissions', ['edit_permissions']);

            // Settings tab
            $settings_menu = $menu->add(trans('chronos.scaffolding::menu.Settings'), null)
                ->prepend('<span class="icon c4icon-sliders-1"></span>')
                ->data('order', 900)->data('permissions', ['edit_settings', 'edit_access_tokens', 'edit_image_styles']);
            $settings_menu->add(trans('chronos.scaffolding::menu.Access tokens'), ['route' => 'chronos.settings.access_tokens'])
                ->data('order', 910)->data('permissions', ['edit_access_tokens']);
            $settings_menu->add(trans('chronos.scaffolding::menu.Image styles'), ['route' => 'chronos.settings.image_styles'])
                ->data('order', 910)->data('permissions', ['view_image_styles']);
        });

        \View::composer('*', function($view) {
            $view->with('chronos_menu', \Menu::get('ChronosMenu')->sortBy('order'));
        });
    }
protected function registerMenu()
    {
        \Menu::make('ChronosMenu', function($menu) {
//            $menu->add(trans('chronos.scaffolding::menu.Dashboard'), ['route' => 'chronos.dashboard'])
//                ->prepend('<span class="icon c4icon-dashboard"></span>')
//                ->data('order', 1)->data('permissions', ['view_dashboard']);


            // Users tab
            $users_menu = $menu->add(trans('chronos.scaffolding::menu.Users'), null)
                ->prepend('<span class="icon c4icon-user-3"></span>')
                ->data('order', 800)->data('permissions', ['view_roles', 'edit_permissions']);
            $users_menu->add(trans('chronos.scaffolding::menu.Roles'), ['route' => 'chronos.users.roles'])
                ->data('order', 810)->data('permissions', ['view_roles']);
            $users_menu->add(trans('chronos.scaffolding::menu.Permissions'), ['route' => 'chronos.users.permissions'])
                ->data('order', 820)->data('permissions', ['edit_permissions']);

            // Settings tab
            $settings_menu = $menu->add(trans('chronos.scaffolding::menu.Settings'), null)
                ->prepend('<span class="icon c4icon-sliders-1"></span>')
                ->data('order', 900)->data('permissions', ['edit_settings', 'edit_access_tokens', 'edit_image_styles']);
            $settings_menu->add(trans('chronos.scaffolding::menu.Access tokens'), ['route' => 'chronos.settings.access_tokens'])
                ->data('order', 910)->data('permissions', ['edit_access_tokens']);
            $settings_menu->add(trans('chronos.scaffolding::menu.Image styles'), ['route' => 'chronos.settings.image_styles'])
                ->data('order', 910)->data('permissions', ['view_image_styles']);
        });

        \View::composer('*', function($view) {
            $view->with('chronos_menu', \Menu::get('ChronosMenu')->sortBy('order'));
        });
    }
protected function registerMenu ( ) { \ Menu :: make ( 'ChronosMenu' , function ( $ menu ) { //            $menu->add(trans('chronos.scaffolding::menu.Dashboard'), ['route' => 'chronos.dashboard']) //                ->prepend('<span class="icon c4icon-dashboard"></span>') //                ->data('order', 1)->data('permissions', ['view_dashboard']); // Users tab $ users_menu = $ menu -> add ( trans ( 'chronos.scaffolding::menu.Users' ) , null ) -> prepend ( '<span class="icon c4icon-user-3"></span>' ) -> data ( 'order' , 800 ) -> data ( 'permissions' , [ 'view_roles' , 'edit_permissions' ] ) ; $ users_menu -> add ( trans ( 'chronos.scaffolding::menu.Roles' ) , [ 'route' => 'chronos.users.roles' ] ) -> data ( 'order' , 810 ) -> data ( 'permissions' , [ 'view_roles' ] ) ; $ users_menu -> add ( trans ( 'chronos.scaffolding::menu.Permissions' ) , [ 'route' => 'chronos.users.permissions' ] ) -> data ( 'order' , 820 ) -> data ( 'permissions' , [ 'edit_permissions' ] ) ; // Settings tab $ settings_menu = $ menu -> add ( trans ( 'chronos.scaffolding::menu.Settings' ) , null ) -> prepend ( '<span class="icon c4icon-sliders-1"></span>' ) -> data ( 'order' , 900 ) -> data ( 'permissions' , [ 'edit_settings' , 'edit_access_tokens' , 'edit_image_styles' ] ) ; $ settings_menu -> add ( trans ( 'chronos.scaffolding::menu.Access tokens' ) , [ 'route' => 'chronos.settings.access_tokens' ] ) -> data ( 'order' , 910 ) -> data ( 'permissions' , [ 'edit_access_tokens' ] ) ; $ settings_menu -> add ( trans ( 'chronos.scaffolding::menu.Image styles' ) , [ 'route' => 'chronos.settings.image_styles' ] ) -> data ( 'order' , 910 ) -> data ( 'permissions' , [ 'view_image_styles' ] ) ; } ) ; \ View :: composer ( '*' , function ( $ view ) { $ view -> with ( 'chronos_menu' , \ Menu :: get ( 'ChronosMenu' ) -> sortBy ( 'order' ) ) ; } ) ; }
Register menu and share it with all views.
Register menu and share it with all views .