Skip to content

Laravel ACL for Multi Tenancy with User -> Permissions as well as User -> Role/Org Hierarchy -> Permission based on Yajra Laravel ACL

License

Notifications You must be signed in to change notification settings

muhammadsaeedparacha/laravel-acl

 
 

Repository files navigation

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.

About

Laravel ACL for Multi Tenancy with User -> Permissions as well as User -> Role/Org Hierarchy -> Permission based on Yajra Laravel ACL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%