BelongsToMany::toggle()

array toggle(mixed $ids, bool $touch = true) Toggles a model (or models) from the parent. Each existing model is detached, and non existing ones are attached. Parameters mixed $ids bool $touch Return Value array

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::sync()

array sync(Collection|array $ids, bool $detaching = true) Sync the intermediate tables with a list of IDs or collection of models. Parameters Collection|array $ids bool $detaching Return Value array

BelongsToMany::simplePaginate()

Paginator simplePaginate(int $perPage = null, array $columns = array('*'), string $pageName = 'page', int|null $page = null) Paginate the given query into a simple paginator. Parameters int $perPage array $columns string $pageName int|null $page Return Value Paginator

BelongsToMany::saveMany()

array saveMany(Collection|array $models, array $joinings = array()) Save an array of new models and attach them to the parent model. Parameters Collection|array $models array $joinings Return Value array

BelongsToMany::save()

Model save(Model $model, array $joining = array(), bool $touch = true) Save a new model and attach it to the parent model. Parameters Model $model array $joining bool $touch Return Value Model

BelongsToMany::relatedUpdatedAt()

string relatedUpdatedAt() Get the name of the related model's "updated at" column. Return Value string

BelongsToMany::rawUpdate()

int rawUpdate(array $attributes = array()) Run a raw update against the base query. Parameters array $attributes Return Value int

BelongsToMany::paginate()

LengthAwarePaginator paginate(int $perPage = null, array $columns = array('*'), string $pageName = 'page', int|null $page = null) Get a paginator for the "select" statement. Parameters int $perPage array $columns string $pageName int|null $page Return Value LengthAwarePaginator

BelongsToMany::orWherePivotIn()

BelongsToMany orWherePivotIn(string $column, mixed $values) Set an "or where in" clause for a pivot table column. Parameters string $column mixed $values Return Value BelongsToMany