Make all panels use the same Login and Logout routes.
any idea? the issue that I can't find away to override this function
public function getLoginUrl(array $parameters = []): ?string
{
if (! $this->hasLogin()) {
return null;
}
return route("filament.{$this->getId()}.auth.login", $parameters);
}
3 Replies
They use the same login / logout routes for all panels. Only the theming would be different.
Replace $this->getId() to the panel whose login screen you want to display for all panels.
E.g. if you want to use admin panel login for all panels, replace the route as filament.admin.auth.login
@hassan.ib I would instead do the following.
For each of your panels, create a middleware. I will use the default Laravel Authenticate middleware for this example.
In
App\Http\Middleware\Authenticate
do the following:
In all of your panels, replace the Auth Middleware with the one I just showed you:
Then in the panel which has the Login you want for all panels, just do the following:
Make sure that no other panels are assigned as the default.@Andrew Wallo thanks a lot, I did something similar.