Looking to hire Laravel developers? Try LaraJobs

laravel-acl maintained by cyber-exploits

Description
Permission handling for Laravel 8.0 and up
Author
Last update
2024/10/15 19:25 (dev-master)
License
Downloads
40

Comments
comments powered by Disqus

Associate users with permissions and roles

Latest Version on Packagist

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.