PHPackages                             reksmey/filament-spatie-roles-permissions - 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. reksmey/filament-spatie-roles-permissions

Abandoned → [bezhansalleh/filament-shield](/?search=bezhansalleh%2Ffilament-shield)ArchivedLibrary-filament-plugin[Authentication &amp; Authorization](/categories/authentication)

reksmey/filament-spatie-roles-permissions
=========================================

filament-spatie-roles-permissions

v1.1.0(4y ago)201726MITPHPPHP ^8.0

Since Dec 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/reksmeysrey/filament-spatie-roles-permissions)[ Packagist](https://packagist.org/packages/reksmey/filament-spatie-roles-permissions)[ Docs](https://github.com/reksmey/filament-spatie-roles-permissions)[ RSS](/packages/reksmey-filament-spatie-roles-permissions/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)Dependencies (13)Versions (4)Used By (0)

Screenshot
----------

[](#screenshot)

[![image](https://user-images.githubusercontent.com/35394133/147733275-4de97f59-243c-4b74-958b-534dd70ae4a9.png)](https://user-images.githubusercontent.com/35394133/147733275-4de97f59-243c-4b74-958b-534dd70ae4a9.png)

Description
===========

[](#description)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4ebae22f1ca537172f2aac4c70cc5193b9a43897ac203c0c024a0a6502c9e639/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72656b736d65792f66696c616d656e742d7370617469652d726f6c65732d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/reksmey/filament-spatie-roles-permissions)[![Total Downloads](https://camo.githubusercontent.com/550462eaf769a7bc6cf95fa824fce958215920610d5704b4e884a4575c68bc8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7265736b6d6579737265792f66696c616d656e742d7370617469652d726f6c65732d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/reskmey/filament-spatie-roles-permissions)[![GitHub Actions](https://github.com/reksmeysrey/filament-spatie-roles-permissions/actions/workflows/main.yml/badge.svg)](https://github.com/reksmeysrey/filament-spatie-roles-permissions/actions/workflows/main.yml/badge.svg)

This plugin is built on top of [Spatie's Permission](https://spatie.be/docs/laravel-permission/v5/introduction) package.

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

[](#installation)

You can install the package via composer:

```
composer require reksmey/filament-spatie-roles-permissions
```

Since the package depends on [Spatie's Permission](https://spatie.be/docs/laravel-permission/v5/introduction) package. You have to publish the migrations by running:

```
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
```

Now you should add any other configurations needed for the Spatie-Permission package.

Usage
-----

[](#usage)

You can add this to your *form* method in your UserResource

```
return $form->schema([
    ...
    BelongsToManyMultiSelect::make('roles')->relationship('roles', 'name')
    ...
    ...
])
```

Advance Usage
-------------

[](#advance-usage)

You can publish permissions seeders in additional permissions. Sometimes you may add more action such as download-pdf, export, etc.

```
php artisan vendor:publish --tag=filament-spatie-roles-and-permissions-seeders

Then

php artisan db:seed --class=RolesAndPermissionsSeeder
```

Customize RoleResource
----------------------

[](#customize-roleresource)

- publish service provider ```
    php artisan vendor:publish --tag=filament-spatie-roles-and-permissions-provider
    ```
- add the package to the `extra.laravel.dont-discover` key in `composer.json`, e.g. ```
    "extra": {
      "laravel": {
        "dont-discover": [
          "reksmey/filament-spatie-roles-permissions"
        ]
      }
    }
    ```
- publish RoleResource ```
    php artisan filament-spatie-roles-permissions:publish-role-resource
    ```
- you can customize RoleResource in App\\Filament

##### [For authorization, Filament will observe any model policies that are registered in your app](https://filamentadmin.com/docs/2.x/admin/resources#authorization)

[](#for-authorization-filament-will-observe-any-model-policies-that-are-registered-in-your-app)

Hope you enjoy it ❤️

### Security

[](#security)

If you discover any security related issues, please create an issue.

Credits
-------

[](#credits)

- [bezhanSalleh](https://gist.github.com/bezhanSalleh/bda7d8db237a0c45549b63dafaa387c1)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.3% 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 ~13 days

Total

2

Last Release

1581d ago

PHP version history (2 changes)v1.0PHP ^7.4|^8.0

v1.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b23a113010234f4e175c99cf62b3b3b0439b698c00431405fc2430d1175c535?d=identicon)[reksmeysrey](/maintainers/reksmeysrey)

---

Top Contributors

[![YSRoot](https://avatars.githubusercontent.com/u/11317245?v=4)](https://github.com/YSRoot "YSRoot (18 commits)")[![reksmeysrey](https://avatars.githubusercontent.com/u/35394133?v=4)](https://github.com/reksmeysrey "reksmeysrey (10 commits)")[![mohamedsabil83](https://avatars.githubusercontent.com/u/10126040?v=4)](https://github.com/mohamedsabil83 "mohamedsabil83 (2 commits)")[![reksmeyGo24](https://avatars.githubusercontent.com/u/100746195?v=4)](https://github.com/reksmeyGo24 "reksmeyGo24 (2 commits)")

---

Tags

filament-spatie-roles-permissionsreksmey

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/reksmey-filament-spatie-roles-permissions/health.svg)

```
[![Health](https://phpackages.com/badges/reksmey-filament-spatie-roles-permissions/health.svg)](https://phpackages.com/packages/reksmey-filament-spatie-roles-permissions)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[althinect/filament-spatie-roles-permissions

340954.7k9](/packages/althinect-filament-spatie-roles-permissions)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)

PHPackages © 2026

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