class
Illuminate
/
Database
/
Eloquent
/
Relations
/
MorphOne
MorphOne
Extends
Implements
Uses
Methods
public
getResults ( ) : mixed
Get the results of the relationship.
public
initRelation ( array $models , $relation ) : array
Initialize the relation on a set of models.
Parameters
- $models array
- $relation string
public
match ( array $models , Illuminate\...\Collection $results , $relation ) : array
Match the eagerly loaded results to their parents.
Parameters
- $models array
- $results Illuminate\...\Collection
- $relation string
public
getRelationExistenceQuery ( Builder $query , Builder $parentQuery , $columns ) : Builder
Get the relationship query.
Parameters
public
addOneOfManySubQueryConstraints ( Builder $query , $column , $aggregate ) : void
Add constraints for inner join subselect for one of many relationships.
Parameters
- $query Builder
- $column string|null
- $aggregate string|null
public
getOneOfManySubQuerySelectColumns ( ) : array|string
Get the columns that should be selected by the one of many subquery.
public
addOneOfManyJoinSubQueryConstraints ( JoinClause $join ) : void
Add join query constraints for one of many relationships.
Parameters
- $join JoinClause