If you want restrict certain user from access another dashboard, in my case /carrier you my use the following function on your user model, Also, remember to implements FilamentUser public function canAccessPanel(Panel $panel): bool { if ($this->hasRole('Carrier')) { // Allow access only to the carrier panel return $panel->getId() === 'carrier'; }
Create Role and Permission Policy | Laravel Filament Roles and Permissions
Thanks for this tutorial. It was my request in one of your recent lessons!
Glad you found it helpful
This is an excellent video (and all the serie to which it belongs to)
Hello Tony, but the writer can perform bulk delete action, and this is not good
How is that and how to prevent it ?
In this project, did you use Jetstream for logging process? Or only filament?
Filament can verify email?
Can you you please make a video about Multiple Panels with Roles in FilamentPHP v3?
If you want restrict certain user from access another dashboard, in my case /carrier you my use the following function on your user model, Also, remember to implements FilamentUser
public function canAccessPanel(Panel $panel): bool
{
if ($this->hasRole('Carrier')) {
// Allow access only to the carrier panel
return $panel->getId() === 'carrier';
}
return $this->hasRole(['Admin', 'Dispatcher', 'Manager']);
}
Thanks' Tony , for the Model extend spatie ..... ,
can this course implement the multi authentication on filamnet
how to create admin and user login panel in filament