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

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

MorphToMany::orWherePivot()

BelongsToMany orWherePivot(string $column, string $operator = null, mixed $value = null) Set an "or where" clause for a pivot table column. Parameters string $column string $operator mixed $value Return Value BelongsToMany

MorphToMany::noConstraints()

static mixed noConstraints(Closure $callback) Run a callback with constraints disabled on the relation. Parameters Closure $callback Return Value mixed

MorphToMany::newPivotStatementForId()

Builder newPivotStatementForId(mixed $id) Get a new pivot statement for a given "other" ID. Parameters mixed $id Return Value Builder

MorphToMany::newPivotStatement()

Builder newPivotStatement() Get a new plain query builder for the pivot table. Return Value Builder

MorphToMany::newPivot()

Pivot newPivot(array $attributes = array(), bool $exists = false) Create a new pivot model instance. Parameters array $attributes bool $exists Return Value Pivot

MorphToMany::newExistingPivot()

Pivot newExistingPivot(array $attributes = array()) Create a new existing pivot model instance. Parameters array $attributes Return Value Pivot

MorphToMany::morphMap()

static array morphMap(array $map = null, bool $merge = true) Set or get the morph map for polymorphic relations. Parameters array $map bool $merge Return Value array

MorphToMany::match()

array match(array $models, Collection $results, string $relation) Match the eagerly loaded results to their parents. Parameters array $models Collection $results string $relation Return Value array