Property | Type | Description | |
---|---|---|---|
$fillable | array | The attributes that are fillable via mass assignment. | |
$table | string | The database table used by the model. | |
$tag | string | The cache tag used by the model. |
Method | Description | |
---|---|---|
assignPermission ( integer $permissionId = null ) : boolean | Assigns the given permission to the role. | |
can ( string $permission ) : boolean | Checks if the role has the given permission. | |
canAtLeast ( array $permission = [] ) : boolean | Check if the role has at least one of the given permissions. | |
flushPermissionCache ( ) : void | Flush the permission cache repository. | |
getPermissions ( ) : array | Get permission slugs assigned to role. | |
permissions ( ) : |
Roles can have many permissions. | |
revokeAllPermissions ( ) : boolean | Revokes all permissions from the role. | |
revokePermission ( integer $permissionId = '' ) : boolean | Revokes the given permission from the role. | |
syncPermissions ( array $permissionIds = [] ) : boolean | Syncs the given permission(s) with the role. | |
users ( ) : |
Roles can belong to many users. |
public assignPermission ( integer $permissionId = null ) : boolean | ||
$permissionId | integer | |
return | boolean |
public canAtLeast ( array $permission = [] ) : boolean | ||
$permission | array | |
return | boolean |
public flushPermissionCache ( ) : void | ||
return | void |
public getPermissions ( ) : array | ||
return | array |
public permissions ( ) : |
||
return |
public revokeAllPermissions ( ) : boolean | ||
return | boolean |
public revokePermission ( integer $permissionId = '' ) : boolean | ||
$permissionId | integer | |
return | boolean |
public syncPermissions ( array $permissionIds = [] ) : boolean | ||
$permissionIds | array | |
return | boolean |
public users ( ) : |
||
return |
protected array $fillable | ||
return | array |
protected string $table | ||
return | string |