Download the PHP package buzz/laravel-advanced-authorization without Composer
On this page you can find all versions of the php package buzz/laravel-advanced-authorization. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download buzz/laravel-advanced-authorization
More information about buzz/laravel-advanced-authorization
Files in buzz/laravel-advanced-authorization
Package laravel-advanced-authorization
Short Description Package for handling advanced authorization (role and permission) in Laravel 5.*
License MIT
Homepage https://github.com/thinhbuzz/laravel-advanced-authorization
Informations about the package laravel-advanced-authorization
Advanced authorization in Laravel >= 5.5
development mode
Check list
- [ ] Cache
- [x] Super user
-
[ ] ...
- Installation
- Composer
- Middleware
- Configuration
- Pubslish
- Config package
- Config model
- Instruction
- Creating data
- Attach/ detach role and permission
- Checking role/ permission/ level
- Use Middleware
Installation
Composer
Run command:
Or open composer.json, insert into bellow code and run command composer update
Middleware
Package already register middleware permission
Configuration
- So publish config, migrations, models you can run command
And after that run command: php artisan migrate
(maybe you want edit migration file before run this command)
User model
You need to remove trait Authorizable
and contract AuthorizableContract
(default of laravel).
Instruction
Creating data
Create Role
Attach/ detach data
Attach/ detach permissions
Attach/ detach roles
Checking role/ permission/ level
Always return
false
ifAuth::check() === false
All blade shortcuts available if config
blade_shortcut
is true
Check has role or has all roles
Check has one in any roles
Check has permission or has all permissions
Check has one in any permissions
Check level (available if config user_level
is true)
Check with Middleware
Throw new exception if not match, you can change exception class in config with key permission_exception, role_exception, level_exception
Check permission
Check role
Check level: by default package get smallest level of user and compare, if you want use greatest level you can add prefix "max". Example:
- level:max1
- level:max1<=>3
- level:max<3
- ...
Docs in the process of finalizing
All versions of laravel-advanced-authorization with dependencies
illuminate/support Version 5.0.*|5.1.*
illuminate/contracts Version 5.0.*|5.1.*