abstract class Relation (View source)

Properties

protected Model $parent

The parent model instance

$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

__construct(Model $related, Model $parent)

Relation Contructor

void
addConstraints()

Set the base constraints on the relation query.

mixed
getResults()

Get the results of the relationship.

getParent()

Get the parent model.

getRelated()

Get associated model class.

mixed
__call(string $method, array $args)

_Call

Details

__construct(Model $related, Model $parent)

Relation Contructor

Parameters

Model $related
Model $parent

abstract void addConstraints()

Set the base constraints on the relation query.

Return Value

void

abstract mixed getResults()

Get the results of the relationship.

Return Value

mixed

Model getParent()

Get the parent model.

Return Value

Model

Model getRelated()

Get associated model class.

Return Value

Model

mixed __call(string $method, array $args)

_Call

Parameters

string $method
array $args

Return Value

mixed