Skip to content

nagarjunbn/acl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roles-permission management for laravel with User interface

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

Laravel version supported

version >= 5.5

Steps for installation

  1. Install plugin via command
composer require nagarjunbn/acl
  1. Register the service provider in app.php
Nagarjun\ACL\ACLServiceProvider::class
  1. Seeding and migration
php artisan migrate
php artisan db:seed --class=Nagarjun\\ACL\\Seeding\\ExcludedRouteTableSeeder
  1. Update your Users table and add 'role_id' column
  2. Add the below code to your User.php model file
public function Role() {
    return $this->belongsTo('\Nagarjun\ACL\Models\Role', 'role_id', 'id');
}
  1. 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 .
  2. Access the plugin via URL and set permissions
http://domain/acl/dashboard
  1. Use the middleware 'acl' in your routes,controllers to prevent the access .

Screenshot

alt text

License

The composer plugin is open-source software licensed under the MIT license