MorphTo
class MorphTo extends BelongsTo (View source)
Methods
void __construct(Builder $query, Model $parent, string $foreignKey, string $otherKey, string $type, string $relation) Create a new morph to relationship instance. void addConstraints() Set the base constraints on the relation query. from BelongsTo void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. array initRelation(array $models, string $relation) Initialize the relatio