Installation
Installation
Installing Laravel ACL
Laravel ACL can be installed with Composer. More details about this package in Composer can be found here.
Run the following command in your project to get the latest version of the package:
composer require yajra/laravel-acl:^9.0
Configuration
Service Provider
Open the file config/app.php
and then add following service provider.
'providers' => [ // ... Yajra\Acl\AclServiceProvider::class,],
Route Middleware
Open the Kernel.php
file in app\Http\Kernel.php
and add this to used it as middleware :
'canAtLeast' => \Yajra\Acl\Middleware\CanAtLeastMiddleware::class,'permission' => \Yajra\Acl\Middleware\PermissionMiddleware::class,'role' => \Yajra\Acl\Middleware\RoleMiddleware::class,
Configuration
Note: This step is (optional) for the publication of configuration files.
After completing the step above, use the following command to publish configuration settings:
php artisan vendor:publish --tag=laravel-acl
Migrations
You'll need to run the provided migrations against your database:
php artisan migrate