Method |
Description |
|
attachPermission ( object | array $permission ) : void |
Attach permission to current role. |
|
attachPermissions ( mixed $permissions ) : void |
Attach multiple permissions to current role. |
|
bootLaratrustRoleTrait ( ) : void | boolean |
Boot the role model
Attach event listener to remove the many-to-many records when trying to delete
Will NOT delete any records if the role model uses soft deletes. |
|
cachedPermissions ( ) : Illuminate\Database\Eloquent\Collection |
Big block of caching functionality |
|
detachPermission ( object | array $permission ) : void |
Detach permission from current role. |
|
detachPermissions ( mixed $permissions ) : void |
Detach multiple permissions from current role |
|
flushCache ( ) : void |
Flush the role's cache |
|
hasPermission ( string | array $name, boolean $requireAll = false ) : boolean |
Checks if the role has a permission by its name. |
|
permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
Many-to-Many relations with the permission model. |
|
savePermissions ( mixed $inputPermissions ) : array |
Save the inputted permissions. |
|
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
Many-to-Many relations with the user model. |
|