BelongsToMany::wrap()

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

BelongsToMany::withPivot()

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

BelongsToMany::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

BelongsToMany::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

BelongsToMany::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

BelongsToMany::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

BelongsToMany::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

BelongsToMany::touchIfTouching()

void touchIfTouching() If we're touching the parent model, touch. Return Value void

BelongsToMany::syncWithoutDetaching()

array syncWithoutDetaching(Collection|array $ids) Sync the intermediate tables with a list of IDs without detaching. Parameters Collection|array $ids Return Value array

BelongsToMany::updatedAt()

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