FilamentF
Filament12mo ago
fabrice

Disable User Menu on Guest Panel

Hi!
I create a guest panel (without authentication) and i want to disable user menu and replace it to an "Go to dashboard button".

So In GuestPanel, i use PanelsRenderHook::TOPBAR_END hook to add my button.

But i don't find a "php" solution to disabled user menu if an authenticated user go to my guest panel.
My solution is with css :
.fi-panel-guest .fi-user-menu {
    display: none;
}

There's ->visible() on menu items to show/hide item, but not for user menu.

Any solution or what do you think on ->disableUserMenu() feature on panel configuration ?
Was this page helpful?