© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3mo ago•
1 reply
hrvzmndz

Handle multi panel authentication

how can you handle this authentication in middleware. I have 3 panels lawyer, lecturer and admin. I want if admin login in lawyer login incorrect credentials

class RedirectIfNotLawyer
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
$user = auth()->user();

if (! $user || ! $user->hasAnyRole(['User', 'Pending'])) {
return redirect()->route('filament.lawyer.auth.login');
}

return $next($request);
}
}
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

Multi panel
FilamentFFilament / ❓┊help
12mo ago
Multi Panel
FilamentFFilament / ❓┊help
3y ago
Multi tenant navigation panel?
FilamentFFilament / ❓┊help
2y ago
filament panel authentication middleware
FilamentFFilament / ❓┊help
2y ago