2017 © Pedro Peláez
 

laravel acl

Laravel Route Based Acl

image

ashamnx/acl

Laravel Route Based Acl

  • Sunday, September 17, 2017
  • by ashamnx
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 6 % Grown

The README.md

Acl

Laravel Route based ACL., (*1)

Requirements

  • Laravel 5.4 with Passport

Getting Started

1.Install via composer require ashamnx/acl, (*2)

2.Add the package to your application service providers in config/app.php., (*3)

'providers' => [
   ...
   Ashamnx\Acl\AclServiceProvider::class,

],

3.Migrate using php artisan migrate, (*4)

4.Add the middleware to your app/Http/Kernel.php., (*5)

protected $routeMiddleware = [
    ....
    'acl' => \Ashamnx\Acl\Middleware\AclMiddleware::class,

];

5.Make sure all routes that use the middleware are named and the name has the format [prefix].[resource].[action], (*6)

Route::middleware(['acl'])->get('test/win', function() {
    return 'Testing win';
})->name('testing.win');

6.Run php artisan acl:init to create an Administrator group and give all access., (*7)

The Versions

17/09 2017

dev-master

9999999-dev

Laravel Route Based Acl

  Sources   Download

MIT

by Asham Sabir