Method |
Description |
|
attachPermission ( $permission ) |
Alias to eloquent many-to-many relation's attach() method. |
|
attachPermissions ( mixed $permissions ) |
Attach multiple permissions to a user |
|
boot ( ) : void | boolean |
Boot the user model
Attach event listener to remove the many-to-many records when trying to delete
Will NOT delete any records if the user model uses soft deletes. |
|
can ( $permission, boolean $requireAll = false ) : boolean |
Overwrites EntrustUserTrait::can(. |
|
canInRoles ( $permission, boolean $requireAll = false ) : boolean |
Code copy of EntrustUserTrait::can(. |
|
detachPermission ( mixed $permission ) |
Alias to eloquent many-to-many relation's detach() method. |
|
detachPermissions ( mixed $permissions ) |
Detach multiple permissions from a user |
|
hasPermission ( string | array $name, boolean $requireAll = false ) : boolean |
Checks if the user has a permission by its name. |
|
permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
Many-to-Many relations with Permission. |
|