cyber-exploits / laravel-acl
Permission handling for Laravel 8.0 and up
Requires
- php: ^7.2|^8.0|^8.3
- illuminate/auth: ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/container: ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/contracts: ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/database: ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- doctrine/dbal: ^2.9
- orchestra/testbench: ^5.0|^6.0|^7.0
- phpunit/phpunit: ^8.5|^9.3
This package is not auto-updated.
Last update: 2024-11-26 11:03:42 UTC
README
This package allows you to manage user permissions and roles in a database.
Installation
This package can be used in Laravel 5.4 or higher. If you are using an older version of Laravel.
You can install the package via composer:
composer require cyber-exploits/laravel-acl
Now add the service provider in config/app.php
file:
'providers' => [
// ...
CyberExploits\Permission\PermissionServiceProvider::class,
];
You can publish the migration with:
php artisan vendor:publish --provider="CyberExploits\Permission\PermissionServiceProvider" --tag="migrations"
After the migration has been published you can create the role- and permission-tables by running the migrations:
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="CyberExploits\Permission\PermissionServiceProvider" --tag="config"
Troubleshooting
Cache
If you manipulate permission/role data directly in the database instead of calling the supplied methods, then you will not see the changes reflected in the application, because role and permission data is cached to speed up performance.
To manually reset the cache for this package, run:
php artisan cache:forget cyberexploits.permission.cachePermission
php artisan cache:forget cyberexploits.permission.cacheMenu
About CyberExploits
CyberExploits Team Dev.
License
The MIT License (MIT). Please see License File for more information.