SupportsInverseRelations
trait SupportsInverseRelations
Properties
| protected string|null | $inverseRelationship | The name of the inverse relationship. |
Methods
Instruct Eloquent to link the related models back to the parent after the relationship query has run.
Instruct Eloquent to link the related models back to the parent after the relationship query has run.
Guess the name of the inverse relationship.
Get the possible inverse relations for the parent model.
Set the inverse relation on all models in a collection.
Set the inverse relation on a model.
Get the name of the inverse relationship.
Remove the chaperone / inverse relationship for this query.
Remove the chaperone / inverse relationship for this query.
Details
at line 26
SupportsInverseRelations
inverse(string|null $relation = null)
Instruct Eloquent to link the related models back to the parent after the relationship query has run.
Alias of "chaperone".
at line 36
SupportsInverseRelations
chaperone(string|null $relation = null)
Instruct Eloquent to link the related models back to the parent after the relationship query has run.
at line 60
protected string|null
guessInverseRelation()
Guess the name of the inverse relationship.
at line 73
protected array
getPossibleInverseRelations()
Get the possible inverse relations for the parent model.
at line 91
protected mixed
applyInverseRelationToCollection(mixed $models, Model|null $parent = null)
Set the inverse relation on all models in a collection.
at line 106
protected Model
applyInverseRelationToModel(Model $model, Model|null $parent = null)
Set the inverse relation on a model.
at line 120
string|null
getInverseRelationship()
Get the name of the inverse relationship.
at line 132
SupportsInverseRelations
withoutInverse()
Remove the chaperone / inverse relationship for this query.
Alias of "withoutChaperone".
at line 142
SupportsInverseRelations
withoutChaperone()
Remove the chaperone / inverse relationship for this query.