© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
4 replies
tricia.c

Logout Middleware

I had added a new middleware to my AdminPanelProvider.

It redirects a user to their profile page if their profile is not complete.
I have removed the Middleware from my EditProfile page.

But it is preventing these users from logging out (they just get re-redirected to EditProfile). What is the best way to remove the middleware from the logout route?
Solution
In your middleware handle function do it something like this
if ( $request->routeIs('filament.admin.auth.logout') ) 
    return $next($request);
}
if ( $request->routeIs('filament.admin.auth.logout') ) 
    return $next($request);
}

just replace the route of your panel, if it not admin panel
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Logout Route
FilamentFFilament / ❓┊help
11mo ago
Logout error.
FilamentFFilament / ❓┊help
2y ago
Logout redirect
FilamentFFilament / ❓┊help
2y ago
Panel Logout
FilamentFFilament / ❓┊help
3y ago