konekt / acl
Concord Module for Permission handling (Laravel 10 - 11)
Installs: 60 661
Dependents: 1
Suggesters: 0
Security: 0
Stars: 10
Watchers: 4
Forks: 2
Open Issues: 0
Requires
- php: ^8.2
- illuminate/auth: ^10.0|^11.0
- illuminate/container: ^10.0|^11.0
- illuminate/contracts: ^10.0|^11.0
- illuminate/database: ^10.0|^11.0
- konekt/concord: ^1.13
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10.0
README
This package allows you to manage user permissions and roles in a database.
Intro
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 test if a user has a permission with Laravel's default can
function:
$user->can('edit articles');
Package Origins
- This package is a fork of Spatie's Permission v2.1.5.
- Reason for the fork was to convert the package into a Concord compliant module.
- As of v1.0: most of the changes have been ported from Spatie v2.9.0
- Beginning with v2.0, this package no longer maintains compatibility and feature parity with the Spatie Permission package.
- The most important feature of v2 is the possibility of Sharing Eloquent models across users.
Documentation
https://konekt.dev/acl/master/README
Changelog
Please see Changelog for more information what has changed recently.
Credits
This package is a modified variant of Spatie Permission package which 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.
Alternatives
License
The MIT License (MIT). Please see License File for more information.