Skip to content

Latest commit

 

History

History
95 lines (71 loc) · 2.89 KB

README.md

File metadata and controls

95 lines (71 loc) · 2.89 KB

Laravel ACL

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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.

Documentations

Installation

Via Composer

$ composer require yajra/laravel-acl:^3.0

Configuration

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

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.