All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix bug with wrong positioning between groups
- Grouping feature
PositionObserver::lockFor()
andPositionObserver::unlockFor()
methodsPositionObserver::forceFor()
method
- Rework Lock feature
- Refactor
PositionObserver
isMoving()
methodwithoutShiftingPosition
method
getStartPosition
method to define from what number start counting modelsshiftWithTimestamps
method to update timestamps when shifting models- Experimental
lockPositions
method to disable database queries during insertions
- Now timestamps will be preserved by default when shifting model positions
- Method
newPositionQuery
now is public - Use SQL
count
method instead ofmax
for calculating position at the end - Refactored using
PositionObserver
- Rename method
orderByInversePosition
toorderByReversePosition
- Rename method
nextPosition
togetNextPosition
- Method
getNextPosition
can return negative position - Method
getMaxPosition
returns -1 when no records
- The
startPosition
method
- Support for Laravel 10
- Move using negative position values
- Possibility to create model in the middle of the sequence
- Possibility to create model in the beginning of the sequence
- Possibility to update positions without shifting other models
- Extra argument for shift amount in
shiftToStart
andshiftToEnd
methods
- Rename method
getInitPosition
tostartPosition
- Position of other models now are shifted after the model update
- Possibility to update
position
attribute along with other attributes
- Laravel 9 support
- Fix position query scoping for relations
- Documentation
OrderByPosition
global scope- Support for models delete
swap
method- Add PHP 8 support
- Rename
arrangeByIds
intoarrangeByKeys
- Extract
arrangeByKeys
method into query builder - Extract shift methods into query builder
- Base ordering features