MorphOne::addConstraints()

void addConstraints() Set the base constraints on the relation query. Return Value void

MorphOne

MorphOne class MorphOne extends MorphOneOrMany (View source) Methods void __construct(Builder $query, Model $parent, string $type, string $id, string $localKey) Create a new morph one or many relationship instance. from MorphOneOrMany void addConstraints() Set the base constraints on the relation query. from MorphOneOrMany void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. from MorphOneOrMany array initRelation(array $models, string

MorphMany::__construct()

void __construct(Builder $query, Model $parent, string $type, string $id, string $localKey) Create a new morph one or many relationship instance. Parameters Builder $query Model $parent string $type string $id string $localKey Return Value void

MorphMany::__clone()

void __clone() Force a clone of the underlying query builder when cloning. Return Value void

MorphMany::__call()

mixed __call(string $method, array $parameters) Handle dynamic method calls to the relationship. Parameters string $method array $parameters Return Value mixed

MorphMany::wrap()

string wrap(string $value) Wrap the given value with the parent query's grammar. Parameters string $value Return Value string

MorphMany::updateOrCreate()

Model updateOrCreate(array $attributes, array $values = array()) Create or update a related record matching the attributes, and fill it with values. Parameters array $attributes array $values Return Value Model

MorphMany::updatedAt()

string updatedAt() Get the name of the "updated at" column. Return Value string

MorphMany::update()

int update(array $attributes) Perform an update on all the related models. Parameters array $attributes Return Value int

MorphMany::touch()

void touch() Touch all of the related models for the relationship. Return Value void