SupportsPivotInverseRelations
trait SupportsPivotInverseRelations
Properties
| protected string|null | $declaringInverseRelationship | The name of the declaring model's relationship on the pivot. |
|
| protected string|null | $relatedInverseRelationship | The name of the related model's relationship on the pivot. |
Methods
Instruct Eloquent to link the declaring and related models back to the pivot after the relationship query has run.
Remove the chaperone relationships for this query.
Resolve the inverse relation name on the pivot for a given model.
Attempt to guess the inverse relation name on the pivot for a given model.
Derive the inverse relationship name from a pivot key.
Apply chaperone relationships to a pivot model instance.
Details
at line 29
SupportsPivotInverseRelations
chaperone(string|null $declaring = null, string|null $related = null)
Instruct Eloquent to link the declaring and related models back to the pivot after the relationship query has run.
at line 74
SupportsPivotInverseRelations
withoutChaperone()
Remove the chaperone relationships for this query.
at line 90
protected string|null
resolvePivotInverseRelation(Model $pivotModel, string|null $relation, string $foreignKey, Model $model)
Resolve the inverse relation name on the pivot for a given model.
If an explicit name is provided and invalid, an exception is thrown. If guessing fails, null is returned.
at line 106
protected string|null
guessPivotInverseRelation(Model $pivotModel, string $foreignKey, Model $model)
Attempt to guess the inverse relation name on the pivot for a given model.
at line 122
protected string
relationNameFromPivotKey(string $pivotKey, Model $model)
Derive the inverse relationship name from a pivot key.