RbacRoleContract
interface RbacRoleContract
角色约束
Methods
Many-to-Many relations with the user model.
Many-to-Many relations with the permission model.
Save the inputted permissions.
Attach permission to current role.
Detach permission form current role.
Details
at line 17
BelongsToMany
users()
Many-to-Many relations with the user model.
at line 24
BelongsToMany
perms()
Many-to-Many relations with the permission model.
Named "perms" for backwards compatibility. Also, because "perms" is short and sweet.
at line 32
void
savePermissions(mixed $permissions)
deprecated
deprecated
Save the inputted permissions.
at line 39
void
syncPermission(mixed $id)
Save the inputted permissions.
at line 46
void
attachPermission(object|array $id)
Attach permission to current role.
at line 53
void
detachPermission(object|array $id)
Detach permission form current role.
at line 61
void
attachPermissions(array $permissions)
deprecated
deprecated
Attach multiple permissions to current role.
at line 69
void
detachPermissions(array $permissions)
deprecated
deprecated
Detach multiple permissions from current role