MorphTo::match()

array match(array $models, Collection $results, string $relation) Match the eagerly loaded results to their parents. Parameters array $models Collection $results string $relation Return Value array

MorphTo::initRelation()

array initRelation(array $models, string $relation) Initialize the relation on a set of models. Parameters array $models string $relation Return Value array

MorphTo::getResults()

mixed getResults() Get the results of the relationship. Return Value mixed

MorphTo::getRelationQueryForSelfRelation()

Builder getRelationQueryForSelfRelation(Builder $query, Builder $parent, array|mixed $columns = array('*')) Add the constraints for a relationship query on the same table. Parameters Builder $query Builder $parent array|mixed $columns Return Value Builder

MorphTo::getRelationQuery()

Builder getRelationQuery(Builder $query, Builder $parent, array|mixed $columns = array('*')) Add the constraints for a relationship query. Parameters Builder $query Builder $parent array|mixed $columns Return Value Builder

MorphTo::getRelationCountQuery()

Builder getRelationCountQuery(Builder $query, Builder $parent) Add the constraints for a relationship count query. Parameters Builder $query Builder $parent Return Value Builder

MorphTo::getRelationCountHash()

string getRelationCountHash() Get a relationship join table hash. Return Value string

MorphTo::getRelated()

Model getRelated() Get the related model of the relation. Return Value Model

MorphTo::getQuery()

Builder getQuery() Get the underlying query for the relation. Return Value Builder

MorphTo::getQualifiedParentKeyName()

string getQualifiedParentKeyName() Get the fully qualified parent key name. Return Value string