Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Spatie Roles Permissions

Filament Spatie Roles Permissions Laravel Package

althinect/filament-spatie-roles-permissions

Filament plugin built on Spatie's Laravel Permission package that provides admin resources for managing roles and permissions, automatic permission and policy generation, and support for teams. Requires Spatie migrations and the HasRoles trait on your User model.

View on GitHub
Deep Wiki
Context7

Althinect Filament Spatie Roles & Permissions is a Filament plugin built on top of Spatie's Laravel Permission package, providing ready-made resources for managing roles and permissions directly from your admin panel. It also handles permission and policy generation, and supports team-based permissions when enabled in your Spatie configuration.

  • Ready-to-use Role and Permission resources
  • Automatic permission and policy generation
  • Optional teams support
  • Publishable config and translations
  • Simple plugin registration in your panel provider

Requires Spatie's published migrations and the HasRoles trait on your User model.

Frequently asked questions about Filament Spatie Roles Permissions
How do I install althinect/filament-spatie-roles-permissions in a Laravel app?
Install it with composer require althinect/filament-spatie-roles-permissions. Since it depends on Spatie's Laravel Permission package, publish Spatie's migrations with php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider". Then register FilamentSpatieRolesPermissionsPlugin::make() on your panel in the AdminPanelProvider and add the HasRoles trait to your User model.
Which Laravel and PHP versions does filament-spatie-roles-permissions v4 support?
The v4.0.2 release notes do not state the Laravel or PHP floors, so do not assume continuity from v3.3.3. Diff the require and require-dev blocks in composer.json between the v3.3.3 and v4.0.2 tags to confirm the php, laravel/framework, filament/filament, and spatie/laravel-permission constraints. That single check determines whether the upgrade is a no-op or a platform migration.
Is this plugin compatible with Filament v3 and Filament v4?
Filament v2+ compatibility was the stated fit at v3.3.3, but v4.0.2 is a semantic-versioning major bump, which is the most common point for a package to raise its Filament floor. The published notes do not describe any compatibility change, so verify the filament/filament constraint in composer.json before upgrading. This is the largest architectural unknown for the v4 line.
Does filament-spatie-roles-permissions support spatie/laravel-permission v8?
The README links to the Spatie Laravel Permission v8 documentation, and explicit v8 support was the premise of the previous assessment against v3.3.3. That premise should be treated as carried forward but unverified at v4.x, because the release notes say nothing about dependency constraints. Confirm the constraint in the new composer.json, for example ^8.0 versus a narrower pinned range, before assuming continuity.
How do I enable teams support for roles and permissions?
Set the teams attribute to true in your config/permission.php file, which is the Spatie-side switch the plugin relies on. Teams support in this package remains optional and its scope is unchanged according to the available notes. Re-validate team-scoped permission resolution after you have confirmed the dependency floors in v4.
How does the permission and policy generation feature work?
The package can generate permissions and policies for your models, and the behavior is controlled through config/filament-spatie-roles-permissions-config.php. There is no documented change to generation in the v4.0.2 notes, so treat the output as functionally identical until proven otherwise. Still, re-diff any generated policies against a v3.3.3 baseline to catch silent template drift that could alter authorization behavior.
What breaking changes are in v4.0.2 compared to v3.3.3?
The visible v4.0.2 notes contain only two items: a zh_TW translation fix and a composer.json author-email correction. Neither justifies a major version increment, so the realistic explanations are that the major was cut for changes described in the v4.0.0 and v4.0.1 releases, or that it was bumped for a dependency-floor or metadata change captured in composer.json. Review the v4.0.0 release notes and the composer.json diff between tags rather than relying on the v4.0.2 notes alone.
Will updating to v4 overwrite my published config file?
Yes, the README explicitly warns that running php artisan vendor:publish --tag="filament-spatie-roles-permissions-config" --force overrides your existing settings. Back up and diff your published config file before republishing, especially if v4 renamed or removed any keys. This is a medium-high risk if you have customized permission, policy, or resource behavior through config values.
How do I test roles and permissions in a Laravel app using this plugin?
Test the underlying authorization with Spatie's permission testing helpers, seeding roles and permissions in your test setup and asserting gate and policy results for each user. Because the plugin only adds Filament resources on top of Spatie, test the resources through Filament's Livewire testing utilities rather than expecting the package to ship its own test helpers. If teams are enabled, include a team context in your tests to confirm scoped permission resolution.
Is filament-spatie-roles-permissions still maintained, and what are the alternatives?
The package is actively versioned on Packagist and GitHub, with v4.0.2 as the current release, but the thin changelog on a major bump means the change surface is unreviewed rather than absent. Alternatives include writing your own Filament resources directly against Spatie's Laravel Permission API or using other community permission plugins. Before adopting or upgrading, check the v4.0.0 notes and the composer.json diff, and run composer why-not for both this package and spatie/laravel-permission to surface constraint conflicts.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource