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); }...
Jump to solution
3 Replies
Solution
rajul
rajul3mo ago
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
tricia.c
tricia.cOP3mo ago
Thank you @rajul
rajul
rajul3mo ago
Mark it as done, by More >> App >> Mark Solution
Want results from more Discord servers?
Add your server