메소드 |
설명 |
|
assign ( Role | string $role ) |
Assign the given role to the model. |
|
isA ( string $role ) : boolean |
Check if the model has any of the given roles. |
|
isAll ( string $role ) : boolean |
Check if the model has all of the given roles. |
|
isAn ( string $role ) : boolean |
Check if the model has any of the given roles. |
|
isNot ( string $role ) : boolean |
Check if the model has none of the given roles. |
|
isNotA ( string $role ) : boolean |
Check if the model has none of the given roles. |
|
isNotAn ( string $role ) : boolean |
Check if the model has none of the given roles. |
|
retract ( Role | string $role ) |
Retract the given role from the model. |
|
roles ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany |
The roles relationship. |
|
scopeWhereIs ( Builder $query, string $role ) : void |
Constrain the given query by the provided role. |
|
scopeWhereIsAll ( Builder $query, string $role ) : void |
Constrain the given query by all provided roles. |
|