app/Module/ModuleThemeTrait.php
public function menuControlPanel(Tree $tree): ?Menu
    {
        if (Auth::isAdmin()) {
            return new Menu(I18N::translate('Control panel'), route('admin-control-panel'), 'menu-admin');
        }

        if (Auth::isManager($tree)) {
            return new Menu(I18N::translate('Control panel'), route('admin-control-panel-manager'), 'menu-admin');
        }

        return null;
    }
public function menuControlPanel(Tree $tree): ?Menu
    {
        if (Auth::isAdmin()) {
            return new Menu(I18N::translate('Control panel'), route('admin-control-panel'), 'menu-admin');
        }

        if (Auth::isManager($tree)) {
            return new Menu(I18N::translate('Control panel'), route('admin-control-panel-manager'), 'menu-admin');
        }

        return null;
    }
public function menuControlPanel ( Tree $ tree ) : ? Menu { if ( Auth :: isAdmin ( ) ) { return new Menu ( I18N :: translate ( 'Control panel' ) , route ( 'admin-control-panel' ) , 'menu-admin' ) ; } if ( Auth :: isManager ( $ tree ) ) { return new Menu ( I18N :: translate ( 'Control panel' ) , route ( 'admin-control-panel-manager' ) , 'menu-admin' ) ; } return null ; }
Generate a menu item for the control panel.

@param Tree $tree

@return Menu|null
Generate a menu item for the control panel .