EnforcesPermissionPartition
trait EnforcesPermissionPartition
Properties
| protected PermissionRegistrar | $permissionPartitionRegistrar | ||
| protected PermissionRelationContext | $permissionRelationContext | ||
| protected ConnectionInterface|null | $permissionPivotConnection |
Methods
Initialize the permission partition relation state.
Get the relation's captured permission context.
Get the connection that owns permission pivots.
Format an attachment record without allowing partition overrides.
Update an existing pivot without allowing partition movement.
Detach pivot records within the captured permission context.
Get and mark lazily loaded relation results.
Match and mark eager-loaded relation collections.
Reject conflicting caller-supplied partition attributes.
Details
at line 26
protected void
initializePermissionPartitionRelation(PermissionRegistrar $registrar, PermissionRelationContext $context)
Initialize the permission partition relation state.
at line 37
PermissionRelationContext
getPermissionRelationContext()
Get the relation's captured permission context.
at line 45
protected ConnectionInterface
getPivotConnection()
Get the connection that owns permission pivots.
at line 54
protected array
formatAttachRecord(int|string $key, mixed $value, array $attributes, bool $hasTimestamps)
Format an attachment record without allowing partition overrides.
at line 79
int
updateExistingPivot(mixed $id, array $attributes, bool $touch = true)
Update an existing pivot without allowing partition movement.
at line 97
int
detach(mixed $ids = null, bool $touch = true)
Detach pivot records within the captured permission context.
at line 107
Collection
getResults()
Get and mark lazily loaded relation results.
at line 129
array
match(array $models, Collection $results, string $relation)
Match and mark eager-loaded relation collections.
at line 149
protected void
ensurePivotMatchesPermissionPartition(array $attributes)
Reject conflicting caller-supplied partition attributes.