Check User-Permissions
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Database/migrations
app
public/css
resources/views
AclResource.sql
LICENSE
README.md

README.md

Access Control List for Laravel 5

Give user individual rights and roles

Install

Edit config/app and add the following lines

  'providers' => [
    // ...
    'App\Providers\AclServiceProvider',
    // ...
  ];
  'aliases' => [
    // ...
    'AclHelper'     => 'App\Facades\AclHelper',
    // ...
  ];

Edit App\Http\Kernel and add the following lines

    protected $routeMiddleware = [
	  //
    'acl' => 'App\Http\Middleware\Acl',
    ];
Usage

Controller Example Class and Method

/**
 * @Middleware("acl")
 */

Blade Example

@if(hasResource('acl.listUserResources'))
    <a href="{!! route('acl.listUserResources', 1) !!}">User Rechte hinzufügen </a>
@endif
Requirements

Todo

  • Composer Install
  • Command to Install Resources and Roles