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 →
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article
Laravel AI SDK Adds Human-in-the-Loop Tool Approval image

Laravel AI SDK Adds Human-in-the-Loop Tool Approval

Read article
Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals image

Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals

Read article
Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs image

Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs

Read article
Blade Formatting in Laravel Pint image

Blade Formatting in Laravel Pint

Read article
Inertia DevTools Is Now on the Chrome Web Store image

Inertia DevTools Is Now on the Chrome Web Store

Read article