morilog / acl by morilog

Access control list management for Laravel Framework
29
3
2
Package Data
Maintainer Username: morilog
Maintainer Contact: m.parvini@outlook.com (Morteza Parvini)
Package Create Date: 2015-10-08
Package Last Update: 2016-01-31
Home Page: http://morilog.ir
Language: PHP
License: GPL
Last Refreshed: 2024-04-19 15:01:59
Package Statistics
Total Downloads: 29
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 3
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel ACL

User-Role-Permission ACL system for Laravel >= 5.1

Installation

Getting Package

Add following line to your composer.json' file at require section:

"require": {
    "morilog/acl": "dev-master"
}

And run composer update

Configs

Publish configs with this command and set admin_user_id:

php artisan vendor:publish --provider="Morilog\Acl\AclServiceProvider" --tag="config"

in app.php:

services:

Morilog\Acl\AclServiceProvider::class

alias:

'Acl' => 'Morilog\Acl\Facades\Acl'

Middleware

Open kernel.php file in app/Http' directory and add bellow line to $routeMiddleware` array:

   'acl' => Morilog\Acl\Middlewares\AclCheck::class

Migrations

php artisan vendor:publish --provider="Morilog\Acl\AclServiceProvider" --tag="migration"

Commands

php artisan morilog:acl:add-roles
php artisan morilog:acl:admin-roles
php artisan morilog:acl:add-permissions
php artisan morilog:acl:clear-permissions