nagarjunbn / acl
Roles-permission management for laravel with User interface
1.1
2019-08-01 11:55 UTC
Requires
- php: ^7.0
This package is auto-updated.
Last update: 2025-04-29 01:00:59 UTC
README
Laravel version supported
version >= 5.5
Steps for installation
- Install plugin via command
composer require nagarjunbn/acl
- Register the service provider in
app.php
Nagarjun\ACL\ACLServiceProvider::class
- Seeding and migration
php artisan migrate
php artisan db:seed --class=Nagarjun\\ACL\\Seeding\\ExcludedRouteTableSeeder
- Update your Users table and add
'role_id'
column - Add the below code to your User.php model file
public function Role() {
return $this->belongsTo('\Nagarjun\ACL\Models\Role', 'role_id', 'id');
}
- Make sure your application environment is local i.e.,
APP_ENV=local
. The ACL urls are enabled if the application is not in production mode to avoid misuse of the plugin . - Access the plugin via URL and set permissions
http://domain/acl/dashboard
- Use the middleware
'acl'
in your routes,controllers to prevent the access .
Screenshot
License
The composer plugin is open-source software licensed under the MIT license