Laravel ACL is a simple role, permission ACL for Laravel Framework. This package was based on the great package Caffeinated/Shinobi but is fully compatible with Laravel's built-in Gate/Authorization system.
Via Composer
$ composer require yajra/laravel-acl:^3.0
Register service provider:
Yajra\Acl\AclServiceProvider::class
Register Middlewares: in App\Http\Kernel.php
'canAtLeast' => \Yajra\Acl\Middleware\CanAtLeastMiddleware::class,
'permission' => \Yajra\Acl\Middleware\PermissionMiddleware::class,
'role' => \Yajra\Acl\Middleware\RoleMiddleware::class,
Define User Trait in User Model
...
use Yajra\Acl\Traits\HasRoleAndPermission;
class User extends Authenticatable
{
...
use HasRoleAndPerimssions;
...
Publish assets:
$ php artisan vendor:publish --tag=laravel-acl
Run migrations:
php artisan migrate
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.