Download the PHP package jumbodroid/phprbac without Composer
On this page you can find all versions of the php package jumbodroid/phprbac. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jumbodroid/phprbac
More information about jumbodroid/phprbac
Files in jumbodroid/phprbac
Package phprbac
Short Description PHP RBAC is a wrapper around the OWASP/rbac package to support the Laravel framework
License MIT
Informations about the package phprbac
phprbac
phprbac is wrapper around the OWASP/rbac package that adds support for the Laravel framework
Leverage phprbac to add NIST Level 2 Authorization to your Laravel projects.
Add the provider to config/app.php providers array
Jumbodroid\PhpRbac\ServiceProviders\PhpRbacServiceProvider::class
Run php artisan vendor:publish --provider="Jumbodroid\PhpRbac\ServiceProviders\PhpRbacServiceProvider" to publish the config and migration files.
Usage
The complete documentation can be found at phprbac.net. Just replace:
Rbac->{Permissions}
withRbac->permissions()
Rbac->{Roles}
withRbac->roles()
Rbac->{Users}
withRbac->users()
To get an instance of the Rbac class, useRbac->getInstance()
Roles
-
Create new role
-
Find role title
-
Find list of permissions assigned to a given role
-
Unassign all permissions assigned to a given role
-
Assign permission to a role
-
Remove a role and all its descendants
- Removes a role
Permissions
-
Create a new permission
-
Check if a given permission exists
-
Unassign all roles assigned to a given permission
- Removes a given permission
Users
-
Unassign a given role from all users
-
Check if a given user has a given role
-
Retrieves all roles assigned to a given user
-
Assign a given role to a user
- Unassign a given role from a user