Skip to content
A RBAC Tool For Laravel
Branch: master
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.
sample
src
.gitignore
LICENSE
README.md
composer.json
composer.lock

README.md

rbac-in-laravel

A RBAC Tool For Laravel

  • Run this code to publish migrations
php artisan vendor:publish --provider="Ansuir\RBACForLaravel\RBACServiceProvider" --force
  • And then run this code to refresh migrations
php artisan migrate
  • Your UserModel should implement UserInterface and RBACUserTrait will help you.
class User extends Model implements UserInterface {
    use RBACUserTrait;
}
  • Then make the config file rbac.php to config your special setting. You can also see the file sample/rbac.php

  • Add Provider to app.php in the end :

'provider' => [
   ...
   ...
   
   /** RBAC For Laravel */
   \Ansuir\RBACForLaravel\RBACServiceProvider::class,
   
]
You can’t perform that action at this time.