Download the PHP package enclave-code/static-auth-manager without Composer
On this page you can find all versions of the php package enclave-code/static-auth-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download enclave-code/static-auth-manager
More information about enclave-code/static-auth-manager
Files in enclave-code/static-auth-manager
Package static-auth-manager
Short Description Static manage roles and permission in Laravel
License MIT
Informations about the package static-auth-manager
Laravel StaticAuthManager
Manage user permissions and roles in your Laravel application by domain driven rules.
- Installation
- Usage
- Using roles
- Using permissions
- Using Blade directives
- Using middleware
- Config
Example
Add single role
Add many roles
You can define roles and permissions by code at config/permission.php
.
You can check permissions by
Installation
Older than Laravel 5.5 need a service provider registration.
Usage
Add trait to model
Using roles
You can define the roles in the config/permission.php
file.
Assign role/roles
Add a role to a model.
Add a roles to a model.
Check role/roles
You can check the roles via:
Detach role/roles
You can detach the roles via:
Using permissions
Permissions are based on the MQTT syntax. Permissions are specified as path. Thus, individual security levels can be mapped and generally released via wildcards.
Check permissions
Configuration
*
Wildcard for everything following
You can define the role permissions in the config/permission.php
file.
Using Blade directives
You can use Blade directives in your views.
Role
Permission
You can use several permissions too.
Middleware
Add the middleware to your src/Http/Kernel.php
And use it like
Config
Example Config
Additional config in .env
Testing
Todo
- Add new migration to user with new column with role
- Describe how roles and permissions work in readme
Credits
Primarily forked from sourceboat/laravel-static-permission.
License
The MIT License (MIT). Please see License File for more information.