PHPackages                             lloricode/filament-spatie-laravel-permission-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. lloricode/filament-spatie-laravel-permission-plugin

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

lloricode/filament-spatie-laravel-permission-plugin
===================================================

Spatie Laravel permission inside of Filament.

v2.2.1(2mo ago)017.1k↑171.4%MITPHPPHP ^8.3CI passing

Since Aug 10Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/lloricode/filament-spatie-laravel-permission-plugin)[ Packagist](https://packagist.org/packages/lloricode/filament-spatie-laravel-permission-plugin)[ Docs](https://github.com/lloricode/filament-spatie-laravel-permission-plugin)[ GitHub Sponsors](https://github.com/lloricode)[ RSS](/packages/lloricode-filament-spatie-laravel-permission-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (38)Versions (22)Used By (0)

Filament spatie laravel permission plugin
=========================================

[](#filament-spatie-laravel-permission-plugin)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aee707a096e750a3eed07b1c553898516377914de96755cb06a2d1d46bf4b3da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6c6f7269636f64652f66696c616d656e742d7370617469652d6c61726176656c2d7065726d697373696f6e2d706c7567696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lloricode/filament-spatie-laravel-permission-plugin)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a004b476835d83c8e3b5e9d7939652bbe50343a3cbac74b7d010492a8460f46a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6c6f7269636f64652f66696c616d656e742d7370617469652d6c61726176656c2d7065726d697373696f6e2d706c7567696e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/lloricode/filament-spatie-laravel-permission-plugin/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/6024324ee28c5e87652e2d38748c2dd9a0f3315e51b9a9e477d161e9b796b6d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6c6f7269636f64652f66696c616d656e742d7370617469652d6c61726176656c2d7065726d697373696f6e2d706c7567696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lloricode/filament-spatie-laravel-permission-plugin)[![codecov](https://camo.githubusercontent.com/317deb08291709a401e22638a30a6eea7ff3b8053f0e77ded2bf840daa67d7c8/68747470733a2f2f636f6465636f762e696f2f67682f6c6c6f7269636f64652f66696c616d656e742d7370617469652d6c61726176656c2d7065726d697373696f6e2d706c7567696e2f67726170682f62616467652e7376673f746f6b656e3d5a3042584a344c564c33)](https://codecov.io/gh/lloricode/filament-spatie-laravel-permission-plugin)

Requirements
------------

[](#requirements)

- Laravel 11.20+ and up
- PHP 8.3+
- [Spatie/laravel-permission 6.9+ and up](https://github.com/spatie/laravel-permission/tree/6.9.0)
- Filament 3.2.98+ and up

Pre-requisite
-------------

[](#pre-requisite)

To be able to use this package, you need to have [spatie/laravel-permission v6.9+](https://github.com/spatie/laravel-permission/tree/6.9.0) installed. Then follow the installation guide of spatie/laravel-permission.

This has used a [wildcard](https://spatie.be/docs/laravel-permission/v6/basic-usage/wildcard-permissions) permission based. So you must to set this on your `config/permission.php` file, else it will throw an exception `Please enable wildcard permission in your config/permission.php`.

```
// config/permission.php
'enable_wildcard_permission' => true,
```

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require lloricode/filament-spatie-laravel-permission-plugin
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-permission-config"
```

This is the contents of the published config file:

Usage
-----

[](#usage)

```
use Lloricode\FilamentSpatieLaravelPermissionPlugin\FilamentPermissionPlugin;

->plugins([
    FilamentPermissionPlugin::make(),
])
```

### Setting up user model

[](#setting-up-user-model)

```
// ...
use Lloricode\FilamentSpatieLaravelPermissionPlugin\Concern\PermissionUser;
use Lloricode\FilamentSpatieLaravelPermissionPlugin\Contracts\HasPermissionUser;

class Admin extends Authenticatable implements HasPermissionUser // ...
{
    use PermissionUser;
// ...
```

### Setting up Filament pages

[](#setting-up-filament-pages)

```
// ...
use Lloricode\FilamentSpatieLaravelPermissionPlugin\Concern\PermissionPages;
use Lloricode\FilamentSpatieLaravelPermissionPlugin\Contracts\HasPermissionPages;

class MyPage extends Page implements HasPermissionPages
{
    use PermissionPages;
// ...
```

### Setting up Filament widgets

[](#setting-up-filament-widgets)

```
// ...
use Lloricode\FilamentSpatieLaravelPermissionPlugin\Concern\PermissionWidgets;
use Lloricode\FilamentSpatieLaravelPermissionPlugin\Contracts\HasPermissionWidgets;

class MyWidget extends ChartWidget implements HasPermissionWidgets
{
    use PermissionWidgets;
// ...
```

Finally, run this command to generate the permission.

```
php artisan permission:sync
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Lloric Mayuga Garcia](https://github.com/lloricode)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 91.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~54 days

Total

21

Last Release

61d ago

Major Versions

v0.6.0 → v1.0.02024-09-03

v1.1.5 → v2.0.0-beta2025-06-13

PHP version history (2 changes)v0.1PHP ^8.2

v2.0.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cdb70b3c1af4426f87d055490f2337dae57cb3bd884b013c5c068f8ee24fab1?d=identicon)[lloricode](/maintainers/lloricode)

---

Top Contributors

[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (164 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

filamentpermissionsspatiespatie-laravel-permissionlaravellloricodefilament-spatie-laravel-permission-plugin

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lloricode-filament-spatie-laravel-permission-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/lloricode-filament-spatie-laravel-permission-plugin/health.svg)](https://phpackages.com/packages/lloricode-filament-spatie-laravel-permission-plugin)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[dutchcodingcompany/filament-socialite

Social login for Filament through Laravel Socialite

213914.9k9](/packages/dutchcodingcompany-filament-socialite)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

438896.6k2](/packages/ryangjchandler-laravel-cloudflare-turnstile)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
