MorphToMany::__construct()

void __construct(Builder $query, Model $parent, string $name, string $table, string $foreignKey, string $otherKey, string $relationName = null, bool $inverse = false) Create a new morph to many relationship instance. Parameters Builder $query Model $parent string $name string $table string $foreignKey string $otherKey string $relationName bool $inverse Return Value void

MorphToMany::__clone()

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

MorphToMany::__call()

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

MorphToMany::wrap()

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

MorphToMany::withTimestamps()

BelongsToMany withTimestamps(mixed $createdAt = null, mixed $updatedAt = null) Specify that the pivot table has creation and update timestamps. Parameters mixed $createdAt mixed $updatedAt Return Value BelongsToMany

MorphToMany::withPivot()

$this withPivot(array|mixed $columns) Set the columns on the pivot table to retrieve. Parameters array|mixed $columns Return Value $this

MorphToMany::wherePivotIn()

BelongsToMany wherePivotIn(string $column, mixed $values, string $boolean = 'and', bool $not = false) Set a "where in" clause for a pivot table column. Parameters string $column mixed $values string $boolean bool $not Return Value BelongsToMany

MorphToMany::wherePivot()

BelongsToMany wherePivot(string $column, string $operator = null, mixed $value = null, string $boolean = 'and') Set a where clause for a pivot table column. Parameters string $column string $operator mixed $value string $boolean Return Value BelongsToMany

MorphToMany::updateOrCreate()

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

MorphToMany::updateExistingPivot()

int updateExistingPivot(mixed $id, array $attributes, bool $touch = true) Update an existing pivot record on the table. Parameters mixed $id array $attributes bool $touch Return Value int