2017 © Pedro Peláez
 

library laravel-acl

acl plugin for laravel

image

gongyuwen/laravel-acl

acl plugin for laravel

  • Friday, June 15, 2018
  • by gongyuwen
  • Repository
  • 0 Watchers
  • 3 Stars
  • 43 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

Laravel-ACL

ACL Plugins for Laravel, (*1)

Installation

Use [Composer] to install the package:, (*2)

$ composer require gongyuwen/laravel-acl

Usage

1.register command, (*3)

//App\Console\Kernel.php

protected $commands = [    
    \LaravelAcl\Console\MakeAclCommand::class
];

2.use command, (*4)

$ php artisan make:acl

3.edit config/acl.php, (*5)

/**
* Example:
* URL: admin/list
* ACTION: Administrator\DefaultController@index
* METHOD: get,post
* ALLOW: member, admin
* DENY: ACL_NO_ROLE
* MIDDLEWARE: acl
* ROUTE NAME: adminlist
**/
return [
    'menus' => [
        'admin' => [
            'namespace' => 'Administrator',
            'action'    => 'DefaultController@index',
            'uri'       => 'list',
            'method'    => 'get,post',
            'allow'     => 'member, admin',
            'deny'      => 'ACL_NO_ROLE',            
            'middleware'=> 'acl',
            'name'      => 'adminlist'
        ]
    ]
];

Method

Method Description Required Type Explain
\ACL::hasAccess() $action Yes Mixed 1.String use '@', for example: DefaultController@index 2.String use '/', for example: users/detail/{user} 3.Illuminate\Routing\Route, for example: Route::current()
\ACL::sidebars() ...$menuname Yes string the key in config/acl.php menus group
\ACL::sidebarsExcept() ...$menuname No string the key in config/acl.php menus group

The Versions

15/06 2018

dev-master

9999999-dev

acl plugin for laravel

  Sources   Download

MIT

by Avatar gongyuwen

15/06 2018

1.0.0

1.0.0.0

acl plugin for laravel

  Sources   Download

MIT

by Avatar gongyuwen

23/10 2017

1.0.1

1.0.1.0

acl plugin for laravel

  Sources   Download

MIT

by Avatar gongyuwen