Methods |
protected
|
setOrderColumn(string $orderColumn): $this
|
#
|
public
|
getOrderColumn(): string
|
#
|
public
|
getQualifiedOrderColumn(): string
|
#
|
public
|
getMaxPosition()
|
#
|
public
|
getNextPosition()
|
#
|
public
|
ordered(string $direction = 'asc'): $this
|
#
|
public
|
unordered(): $this
|
#
|
public
|
forceOrderBy(mixed $column, string $direction = 'asc'): $this
|
#
|
public
|
newPivotQuery($ordered = true): Builder
Create a new query builder for the pivot table.
Create a new query builder for the pivot table.
|
#
|
protected
|
newPivotQueryBetween($leftPosition, $rightPosition): Builder
|
#
|
protected
|
parsePivot(Model $entity): Pivot
Extract the pivot (with the order column) from a model, or fetch it
from the database.
Extract the pivot (with the order column) from a model, or fetch it
from the database.
Throws
|
#
|
public
|
moveToOffset(Model $entity, int $newOffset): $this
Moves the provided model to the specific offset.
Moves the provided model to the specific offset.
Throws
|
#
|
public
|
moveToStart(Model $entity): $this
Moves the provided model to the first position.
Moves the provided model to the first position.
Throws
|
#
|
public
|
moveToEnd(Model $entity): $this
Moves the provided model to the first position.
Moves the provided model to the first position.
Throws
|
#
|
public
|
moveToPosition(Model $entity, int $newPosition): $this
Moves the provided model to the specified position.
Moves the provided model to the specified position.
Throws
|
#
|
public
|
moveUp(Model $entity, int $positions = 1, boolean $strict = true)
|
#
|
public
|
moveDown(Model $entity, int $positions = 1, boolean $strict = true)
|
#
|
public
|
swap(Model $entity1, Model $entity2): $this
Swaps the provided models.
Swaps the provided models.
Throws
|
#
|
public
|
moveAfter(Model $entity, Model $positionEntity): $this
Moves $entity after $positionEntity.
Moves $entity after $positionEntity.
Throws
|
#
|
public
|
moveBefore(Model $entity, Model $positionEntity): $this
Moves $entity before $positionEntity.
Moves $entity before $positionEntity.
Throws
|
#
|
protected
|
move(string $action, Model $entity, Model $positionEntity)
Parameters
$action |
moveAfter/moveBefore
|
Throws
|
#
|
protected
|
getNewPosition(bool $isMoveBefore, bool $isMoveForward, $position): mixed
|
#
|
protected
|
attachNew(array $records, array $current, bool $touch = true): array
Attach all of the records that aren't in the given current records.
Attach all of the records that aren't in the given current records.
|
#
|
public
|
attach(mixed $id, array $attributes = [], bool $touch = true)
Attach a model to the parent.
Attach a model to the parent.
|
#
|
public
|
detach(mixed $ids = null, bool $touch = true): int
Detach models from the relationship.
Detach models from the relationship.
|
#
|
public
|
setOrder(array|Collection $ids): $this
|
#
|
public
|
refreshPositions()
|
#
|
public
|
before($entity)
|
#
|
public
|
after($entity)
|
#
|