Method |
Description |
|
attachPermission ( object | array $permission ) : void |
Attach permission to current role. |
|
attachPermissions ( mixed $permissions ) : void |
Attach multiple permissions to current role. |
|
boot ( ) : 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 ( ) |
Big block of caching functionality. |
|
delete ( array $options = [] ) |
|
|
detachPermission ( object | array $permission ) : void |
Detach permission from current role. |
|
detachPermissions ( mixed $permissions = null ) : void |
Detach multiple permissions from current role |
|
hasPermission ( string | array $name, boolean $requireAll = false ) : boolean |
Checks if the role has a permission by its name. |
|
perms ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
Many-to-Many relations with the permission model. |
|
restore ( ) |
|
|
save ( array $options = [] ) |
|
|
savePermissions ( mixed $inputPermissions ) : void |
Save the inputted permissions. |
|
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
Many-to-Many relations with the user model. |
|