syntaxevolution / laravel-permission
Permission handling for Laravel 5.8 and up with support for tenancy at tenant level
Fund package maintenance!
spatie.be/open-source/support-us
Requires
- php: >=7.2
- hyn/multi-tenant: >=5.5
- illuminate/auth: >=7.0
- illuminate/container: >=7.0
- illuminate/contracts: >=7.0
- illuminate/database: >=7.0
- syntaxevolution/rememberable: >=4.0
Requires (Dev)
- orchestra/testbench: ^3.8|^4.0|^5.0
- phpunit/phpunit: ^8.0
- predis/predis: ^1.1
- dev-master
- 3.6.5
- 3.6.4
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- v2.x-dev
- 2.38.0
- 2.37.0
- 2.36.1
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.2
- 2.28.1
- 2.28.0
- 2.27.0
- 2.26.2
- 2.26.1
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.1
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.2
- 2.19.1
- 2.19.0
- 2.18.0
- 2.17.1
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.2
- 2.12.1
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.2
- 2.9.1
- 2.9.0
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.0.2
- 2.0.1
- 2.0.0
- v1.x-dev
- 1.18.0
- 1.17.0
- 1.16.1
- 1.16.0
- 1.15.0
- 1.14.1
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.1
- dev-fix-guard-checks
This package is auto-updated.
Last update: 2024-11-21 06:56:33 UTC
README
This package allows you to manage user permissions and roles in a database.
Once installed you can do stuff like this:
// Adding permissions to a user $user->givePermissionTo('edit articles'); // Adding permissions via a role $user->assignRole('writer'); $role->givePermissionTo('edit articles');
Because all permissions will be registered on Laravel's gate, you can check if a user has a permission with Laravel's default can
function:
$user->can('edit articles');
Documentation, Installation, and Usage Instructions
See the DOCUMENTATION for detailed installation and usage instructions.
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email me instead of using the issue tracker.
Credits
This package is heavily based on Jeffrey Way's awesome Laracasts lessons on permissions and roles. His original code can be found in this repo on GitHub.
Special thanks to Alex Vanderbist who greatly helped with v2
, and to Chris Brown for his longtime support helping us maintain the package.
Alternatives
- Povilas Korop did an excellent job listing the alternatives in an article on Laravel News. In that same article, he compares laravel-permission to Joseph Silber's Bouncer, which in our book is also an excellent package.
- ultraware/roles takes a slightly different approach to its features.
- santigarcor/laratrust implements team support
- zizaco/entrust offers some wildcard pattern matching
License
The MIT License (MIT). Please see License File for more information.