Remove Sidebar

How i can remove sidebar for user if don't have super_admin role?
6 Replies
m_israilov
m_israilovOP3mo ago
For other roles i have just one resource and i think there is no point in putting sidebar
LeandroFerreira
LeandroFerreira3mo ago
I would keep the authorization as I mentioned and use top navigation to remove the sidebar
$panel
...
->topNavigation(fn () => !auth()->user()->hasRole('super_admin'))
$panel
...
->topNavigation(fn () => !auth()->user()->hasRole('super_admin'))
m_israilov
m_israilovOP3mo ago
Thank you!
LeandroFerreira
LeandroFerreira3mo ago
Did it work? ahh ok, you marked as solved.. thanks
m_israilov
m_israilovOP3mo ago
Yes bro
Want results from more Discord servers?
Add your server