BelongsTo
classe BelongsTo étends Relation (Voir la source)
Propriétés
protected Model | $parent | The parent model instance |
depuis Relation |
protected Model | $related | The related model instance |
depuis Relation |
protected QueryBuilder | $query | The Bow Query builder |
depuis Relation |
static protected bool | $has_constraints | Indicates whether the relation is adding constraints. |
depuis Relation |
static protected bool | $has_pivot | Indicate whether the relationships use a pivot table.*. |
depuis Relation |
protected string | $foreign_key | The foreign key of the parent model. |
|
protected string | $local_key | The associated key on the parent model. |
Méthodes
__construct(Model $related, Model $parent, string $foreign_key, string $local_key)
Create a new belongs to relationship instance.
void
addConstraints()
Set the base constraints on the relation query.
mixed
getResults()
Get the results of the relationship.
Détails
__construct(Model $related, Model $parent, string $foreign_key, string $local_key)
Create a new belongs to relationship instance.
void
addConstraints()
Set the base constraints on the relation query.
mixed
getResults()
Get the results of the relationship.
dans
Relation à la ligne 81
Model
getParent()
Get the parent model.
dans
Relation à la ligne 91
Model
getRelated()
Get associated model class.
dans
Relation à la ligne 103
mixed
__call(string $method, array $args)
_Call