Relation
class Relation (View source)
Methods
Set the base constraints on the relation query.
Set the constraints for an eager load of the relation.
Initialize the relation on a set of models.
Match the eagerly loaded results to their parents.
Get the results of the relationship.
Get the relationship for eager loading.
Touch all of the related models for the relationship.
Run a raw update against the base query.
Add the constraints for a relationship count query.
Add the constraints for a relationship query.
Get the base query builder driving the Eloquent builder.
Get the fully qualified parent key name.
Get the related model of the relation.
Get the name of the "created at" column.
Get the name of the "updated at" column.
Get the name of the related model's "updated at" column.
Wrap the given value with the parent query's grammar.
Set or get the morph map for polymorphic relations.
Handle dynamic method calls to the relationship.
Force a clone of the underlying query builder when cloning.
Details
at line line 78
abstract
void
addEagerConstraints(
array $models)
Set the constraints for an eager load of the relation.
at line line 87
abstract
array
initRelation(
array $models,
string $relation)
Initialize the relation on a set of models.
at line line 97
abstract
array
match(
array $models,
Collection $results,
string $relation)
Match the eagerly loaded results to their parents.
at line line 134
int
rawUpdate(
array $attributes = array())
Run a raw update against the base query.
at line line 146
Builder
getRelationCountQuery(
Builder $query,
Builder $parent)
Add the constraints for a relationship count query.
at line line 159
Builder
getRelationQuery(
Builder $query,
Builder $parent,
array|mixed $columns = array('*'))
Add the constraints for a relationship query.
at line line 174
static
mixed
noConstraints(
Closure $callback)
Run a callback with constraints disabled on the relation.
at line line 305
static
array
morphMap(
array $map = null,
bool $merge = true)
Set or get the morph map for polymorphic relations.
at line line 342
mixed
__call(
string $method,
array $parameters)
Handle dynamic method calls to the relationship.