The Filament Shield package adds access management to your Filament panels, resources, pages, and widgets. It uses Spatie's Laravel Permissions package for the underlying user permissions. Once you install this package, you will add the HasRoles
trait to your user model:
use Spatie\Permission\Traits\HasRoles; class User extends Authenticatable{ use HasRoles;}
After that, running the shield:setup
command will publish config and migrations, run the migrations, and configure your application for tenancy support if specified. Out of the box, Shield handles predefined permissions for Filament resources, and you can also add custom permissions.
Main Features
- Complete Authorization Management
- Resource Permissions
- Page Permissions
- Widget Permissions
- Custom Permissions
- Multi-tenancy Support
- Easy Setup & Configuration
- Best UI
- Policy Generation
- Translations Support
The package readme contains this package's documentation, and you can also view Shield's Filament plugin page for more details. Consult the laravel-permission documentation for more details on the underlying role/permissions in this package.
You can view the source code on GitHub.