Download the PHP package doc88/flux-role-permission without Composer
On this page you can find all versions of the php package doc88/flux-role-permission. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download doc88/flux-role-permission
More information about doc88/flux-role-permission
Files in doc88/flux-role-permission
Package flux-role-permission
Short Description Library for implementing access control by permissions in Laravel applications.
License MIT
Informations about the package flux-role-permission
Flux Role Permission
Library for managing user permissions in Laravel applications.
Requirements
- Laravel >= 6.0
Installation
-
Run the command below at the project root to add the package to the Laravel application:
-
In the providers list in the config/app.php file add:
-
Run the command below at the root of your project to publish the new provider:
-
Run migrations
- In your User Model add the following lines:
Usage
Doc88\FluxRolePermission\Permission Class
Class used to List, Register, Verify and Revoke permissions.
-
List All Permissions
-
List a Permission
-
Create a Permission
-
Delete a Permission
-
List User’s Permissions
-
Checks a User’s Permission
-
Records permission to an User
- Revokes a permission
Using the User Model
It is possible to List, Register, Verify and Revoke permissions using the User class.
-
List User Permissions
-
Checks User Permission
-
Records permission to an User
- Revokes permission
Doc88\FluxRolePermission\Role Class
Class used to List, Register, Verify and Revoke roles.
-
List All Roles
-
List a Role
-
Create a Role
-
Update a Role
-
Add Permission to a Role
-
Remove Permission from a Role
-
Delete a Role
-
List User’s Roles
-
Checks a User’s Role
-
Records Role to an User
- Revokes a Role
Using the User Model
It is possible to List, Register, Verify and Revoke roles using the User class.
-
List User Roles
-
Checks User Role
-
Records role to an User
- Revokes role
Middleware
-
In the $routeMiddleware array in the app\Http\Kernel.php file add:
- Middleware Usage: