Add logout navigationItem to sidebar
Hello !
I'm trying to add a navigation item on my sidebar to logout, I made this in my panel :
but it's not the right method for logout and I can't link the Logout action because NavigationItem doesn't have something to do this
2 Replies
I suspect that's because you would need something like:
NavigationItem::make('log_me_out')->url(\Filament\Facades\Filament::getPanel()->getLogoutUrl()
But even then I think the logout method requires a post request, I'd probably suggest adding your own logout controller?
Thank you !