Relation
abstract class Relation (View source)
Properties
protected string | $foreign_key | The foreign key of the parent model. |
|
protected string | $local_key | The associated key on the parent model. |
|
protected Model | $parent | The parent model instance |
|
protected Model | $related | The related model instance |
|
protected QueryBuilder | $query | The Bow Query builder |
|
static protected bool | $has_constraints | Indicates whether the relation is adding constraints. |
|
static protected bool | $has_pivot | Indicate whether the relationships use a pivot table.*. |
Methods
getRelated()
Get associated model class.
mixed
__call(string $method, array $args)
_Call
mixed
getResults()
Get the results of the relationship.
void
addConstraints()
Set the base constraints on the relation query.
Details
Model
getParent()
Get the parent model.
Model
getRelated()
Get associated model class.
mixed
__call(string $method, array $args)
_Call
Model
create(array $attributes)
Create a new row of the related
abstract mixed
getResults()
Get the results of the relationship.
abstract void
addConstraints()
Set the base constraints on the relation query.