2017 © Pedro Peláez
 

library laravel5-rbac

Laravel 5.2 RBAC

image

askedio/laravel5-rbac

Laravel 5.2 RBAC

  • Sunday, February 28, 2016
  • by gcphost
  • Repository
  • 2 Watchers
  • 7 Stars
  • 120 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel5-RBAC

User Roles & Permissions for Laravel 5.2, (*1)

Overview

This Package glues together laravel-permission and laravel-authorize to be one package giving you all the features and a simple install command to easily get started., (*2)

More details here: * https://github.com/spatie/laravel-permission * https://github.com/spatie/laravel-authorize, (*3)

Installation

Install with composer

composer require askedio/laravel5-rbac:dev-master

Add to Providers array in config/app.php

'providers' => [
   Askedio\Laravel5RBAC\Providers\GenericServiceProvider::class,
   ...

Change your config/auth.php providers->users->model

    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => Askedio\Laravel5RBAC\User::class,
        ],
        ...

Set up auth views and migrations

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"
php artisan make:auth
php artisan migrate 

Install the role and user

php artisan user:create

Serv

php artisan serv

Use in routes

Route::get('dashboard', [
   'middleware'=> ['web','can:admin'],
   'uses' => 'HomeController@index',
]);

The Versions

28/02 2016

dev-master

9999999-dev

Laravel 5.2 RBAC

  Sources   Download

MIT

The Requires

 

laravel user roles permissions rbac