enadstack / laravel-roles
Reusable Roles & Permissions (single or multi-tenant teams) on spatie/laravel-permission
v2.0.0-beta.1
2026-10-30 08:44 UTC
Requires
- php: ^8.3
- enadstack/laravel-action-logger: ^1.2
- illuminate/support: ^13.0
- spatie/laravel-permission: ^8.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v2.x-dev
- v2.0.0-beta.1
- v2.0.0-alpha.10
- v2.0.0-alpha.9
- v2.0.0-alpha.8
- v2.0.0-alpha.7
- v2.0.0-alpha.6
- v2.0.0-alpha.5
- v2.0.0-alpha.4
- v2.0.0-alpha.3
- v2.0.0-alpha.2
- v2.0.0-alpha.1
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- v1.0.1
- v1.0.0
- 0.1.0
- dev-feat/ENAAA-70-role-team-id
- dev-upgrade/laravel-13-support
- dev-copilot/create-reusable-roles-permissions-package
This package is auto-updated.
Last update: 2026-11-11 12:05:56 UTC
README
A reusable, multi-tenant, guard-aware ACL system for Laravel applications built on top of spatie/laravel-permission.
Features
- Contract-based architecture with dependency injection
- Three tenancy modes: single, team-scoped, multi-database
- Guard-aware role and permission management
- Contextual caching (tenant, guard, locale aware)
- Permission matrix with efficient queries (no N+1)
- Diff-based permission sync with wildcard support
- Optional Vue UI (Inertia.js + shadcn-vue)
- Comprehensive artisan commands
- Full i18n support for labels and descriptions
Requirements
- PHP 8.2+
- Laravel 12.0+
- spatie/laravel-permission 6.0+
Supported Tenancy Modes
| Mode | Description |
|---|---|
single |
Non-multi-tenant applications |
team_scoped |
Spatie's built-in team feature |
multi_database |
External providers (stancl/tenancy, etc.) |
Installation
composer require enadstack/laravel-roles php artisan roles:install php artisan roles:sync
Documentation
- Installation
- Configuration
- Tenancy
- Guards
- Roles
- Permissions
- Permission Matrix
- Vue UI
- API Reference
- Caching
- Commands
- Testing
- Upgrading
- Troubleshooting
- Feature Roadmap
Changelog
See CHANGELOG.md for release history.
License
MIT License. See LICENSE for details.
Credits
- Enad Abuzaid
- Built on spatie/laravel-permission