| Package Data | |
|---|---|
| Maintainer Username: | ashamnx |
| Maintainer Contact: | ashamnx@gmail.com (Asham Sabir) |
| Package Create Date: | 2017-07-22 |
| Package Last Update: | 2017-09-17 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-12-10 15:01:16 |
| Package Statistics | |
|---|---|
| Total Downloads: | 28 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Laravel Route based ACL.
1.Install via
composer require ashamnx/acl
2.Add the package to your application service providers in config/app.php.
'providers' => [
...
Ashamnx\Acl\AclServiceProvider::class,
],
3.Migrate using php artisan migrate
4.Add the middleware to your app/Http/Kernel.php.
protected $routeMiddleware = [
....
'acl' => \Ashamnx\Acl\Middleware\AclMiddleware::class,
];
5.Make sure all routes that use the middleware are named and the name has the format [prefix].[resource].[action]
Route::middleware(['acl'])->get('test/win', function() {
return 'Testing win';
})->name('testing.win');
6.Run php artisan acl:init to create an Administrator group and give all access.