Package Data | |
---|---|
Maintainer Username: | sidis405 |
Maintainer Contact: | forge405@gmail.com (Sidrit Trandafili) |
Package Create Date: | 2015-09-11 |
Package Last Update: | 2015-09-11 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-26 15:08:14 |
Package Statistics | |
---|---|
Total Downloads: | 39 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 9 |
Total Watchers: | 5 |
Total Forks: | 0 |
Total Open Issues: | 1 |
This laravel package adds structured ACL (roles and permissions) to Laravel >= 5.1.11
###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
Contributions are welcome and will be fully credited.