Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morilog/acl
Access control list (ACL) management for Laravel Framework
https://github.com/morilog/acl
Last synced: 19 days ago
JSON representation
Access control list (ACL) management for Laravel Framework
- Host: GitHub
- URL: https://github.com/morilog/acl
- Owner: morilog
- License: mit
- Created: 2015-10-08T17:18:15.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-31T07:56:48.000Z (almost 9 years ago)
- Last Synced: 2024-10-11T01:05:12.719Z (about 1 month ago)
- Language: PHP
- Homepage: http://morilog.ir
- Size: 43 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Laravel ACL
User-Role-Permission ACL system for Laravel >= 5.1### Installation
#### Getting Package
Add following line to your `composer.json'` file at `require` section:
```json
"require": {
"morilog/acl": "dev-master"
}
```
And run `composer update`#### Configs
Publish configs with this command and set `admin_user_id`:```
php artisan vendor:publish --provider="Morilog\Acl\AclServiceProvider" --tag="config"
```in `app.php`:
services:
```
Morilog\Acl\AclServiceProvider::class
```
alias:
```
'Acl' => 'Morilog\Acl\Facades\Acl'
```#### Middleware
Open `kernel.php` file in `app/Http' directory and add bellow line to `$routeMiddleware` array:
~~~php
'acl' => Morilog\Acl\Middlewares\AclCheck::class
~~~
#### Migrations
```
php artisan vendor:publish --provider="Morilog\Acl\AclServiceProvider" --tag="migration"
```#### Commands
```
php artisan morilog:acl:add-roles
php artisan morilog:acl:admin-roles
php artisan morilog:acl:add-permissions
php artisan morilog:acl:clear-permissions
```