Laravel Packages

Access Management in Filament With the Shield Plugin

Published
Access Management in Filament With the Shield Plugin image

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.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Validate and Convert HEIC Images in Laravel image

Validate and Convert HEIC Images in Laravel

Read article
Saga Lara Flow: Durable Workflows and Compensating Transactions on Laravel Queues image

Saga Lara Flow: Durable Workflows and Compensating Transactions on Laravel Queues

Read article
Reject Unexpected Array Keys with Laravel Validation image

Reject Unexpected Array Keys with Laravel Validation

Read article
Major performance improvements & security patches for Filament v4.12 and v5.7! image

Major performance improvements & security patches for Filament v4.12 and v5.7!

Read article
Laravel Boost Project Rules: Teach Agents Your Conventions image

Laravel Boost Project Rules: Teach Agents Your Conventions

Read article
Extract an Image's Dominant Color in Laravel image

Extract an Image's Dominant Color in Laravel

Read article