private function generateRightMenu()
    {
        $rightMenu = \Menu::getMenu('rightMenu');

        if (auth()->guest()) {
            $rightMenu->link('login', function (Link $link) {
                $link->name = 'Login';
                $link->url  = route('auth.login');
            });

            // Don't show a link if we don't allow registration.
            if (config('jumpgate.users.settings.allow_registration')) {
                $rightMenu->link('register', function (Link $link) {
                    $link->name = 'Register';
                    $link->url  = route('auth.register');
                });
            }
        }

        if (auth()->check()) {
            $rightMenu->dropdown('user', auth()->user()->display_name, function (DropDown $dropDown) {
                $dropDown->link('user_logout', function (Link $link) {
                    $link->name = 'Logout';
                    $link->url  = route('auth.logout');
                });
            });
        }
    }
private function generateRightMenu()
    {
        $rightMenu = \Menu::getMenu('rightMenu');

        if (auth()->guest()) {
            $rightMenu->link('login', function (Link $link) {
                $link->name = 'Login';
                $link->url  = route('auth.login');
            });

            // Don't show a link if we don't allow registration.
            if (config('jumpgate.users.settings.allow_registration')) {
                $rightMenu->link('register', function (Link $link) {
                    $link->name = 'Register';
                    $link->url  = route('auth.register');
                });
            }
        }

        if (auth()->check()) {
            $rightMenu->dropdown('user', auth()->user()->display_name, function (DropDown $dropDown) {
                $dropDown->link('user_logout', function (Link $link) {
                    $link->name = 'Logout';
                    $link->url  = route('auth.logout');
                });
            });
        }
    }
private function generateRightMenu ( ) { $ rightMenu = \ Menu :: getMenu ( 'rightMenu' ) ; if ( auth ( ) -> guest ( ) ) { $ rightMenu -> link ( 'login' , function ( Link $ link ) { $ link -> name = 'Login' ; $ link -> url = route ( 'auth.login' ) ; } ) ; // Don't show a link if we don't allow registration. if ( config ( 'jumpgate.users.settings.allow_registration' ) ) { $ rightMenu -> link ( 'register' , function ( Link $ link ) { $ link -> name = 'Register' ; $ link -> url = route ( 'auth.register' ) ; } ) ; } } if ( auth ( ) -> check ( ) ) { $ rightMenu -> dropdown ( 'user' , auth ( ) -> user ( ) -> display_name , function ( DropDown $ dropDown ) { $ dropDown -> link ( 'user_logout' , function ( Link $ link ) { $ link -> name = 'Logout' ; $ link -> url = route ( 'auth.logout' ) ; } ) ; } ) ; } }
Adds items to the menu that appears on the right side of the main menu.
Adds items to the menu that appears on the right side of the main menu .