spatie/eloquent-sortable
Add sortable behavior to Laravel Eloquent models via a trait. Automatically sets an order column on create (max + 1) and provides a scope to retrieve records in the correct order. Ideal for drag-and-drop lists and custom ordering.
Support Laravel 13
save() instead of saveQuietly() in moveAfter and moveBefore for consistent model event behavior (#200)moveAfter and moveBefore now fire model events (previously used saveQuietly())Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.5.1...4.5.2
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.5.0...4.5.1
moveAfter and moveBefore methods for precise positioning by @SebastiaanKloos in https://github.com/spatie/eloquent-sortable/pull/189Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.4.2...4.5.0
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.4.1...4.4.2
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.4.0...4.4.1
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.3.0...4.4.0
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.2.0...4.3.0
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.1.1...4.2.0
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.1.0...4.1.1
Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.0.1...4.0.2
getKey insteadsetNewOrder to accept a custom sort columnbuildSortQuery()SoftDeletessetNewOrdermoveToStart, moveToEnd and swapOrdermoveOrderUp (see #13)moveOrderUp- and moveOrderDown-methodssetNewOrder to specify the starting orderHow can I help you explore Laravel packages today?