Hi, I have two types of users - 'admin' and 'client'. I'd like to use the same log-in page for all users, however if the user is an 'admin', then they should be redirected to the filament dashboard on successful login (url is /admin which i think is the default behaviour of canAccessPanel), while clients should be redirected to their own dashboard (url /dashboard).
The current code I have below doesn't work at the moment for clients, but it is a good starting point I believe. The issue with canAccessPanel is that on log in, clients are able to log in but are met with a
public function canAccessPanel(Panel $panel): bool { if ($panel->getId() === 'admin') { if ($this->role == 'admin') { return true; } if ($this->role == 'client') { return false; } } }
public function canAccessPanel(Panel $panel): bool { if ($panel->getId() === 'admin') { if ($this->role == 'admin') { return true; } if ($this->role == 'client') { return false; } } }