Skip to content

sidis405/laravel-acl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrutinizer Code Quality Code Coverage Build Status

This laravel package adds structured ACL (roles and permissions) to Laravel >= 5.1.11

  • Very alpha stages. Not unstable but i need to write tests for it.
  • If you think it's a good starting point for you, take it.

###Installation Add to composer.json

"sid/laravel-acl":"dev-master" 

Register the service provider by adding in the provider section in config/app.php

'providers' => [
    ...
    Sid\Acl\Providers\AclServiceProvider::class
    ...

Just in case

composer dump-autoload

Publish the migration and the config file

php artisan vendor:publish

Migrate the ACL tables

php artisan migrate

Enable it. Modify config/acl.php

return [
    
    'enabled' => false
    
];

In you User model, import the trait

use Sid\Acl\Traits\HasRoles; to App\User

... and use it. Like so.

...
use Authenticatable, Authorizable, CanResetPassword, HasRoles;
...

###Credits Deliberately inspired by Jeffrey Way's lesson at Laracasts.

###Todo

  • Test. Tests. Tests.
  • Expanded documentation on adding roles and permissions
  • Management controllers and views

Contributing

Contributions are welcome and will be fully credited.

About

Add structured ACL to Laravel >= 5.1.11

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages