cyber-exploits/laravel-acl

Permission handling for Laravel 5.8 and up

dev-master 2019-07-23 20:50 UTC

This package is not auto-updated.

Last update: 2020-08-05 05:39:35 UTC


README

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.