Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eloquent Sortable Laravel Package

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.

View on GitHub
Deep Wiki
Context7
5.0.1

Support Laravel 13

5.0.0

What's changed

  • Use save() instead of saveQuietly() in moveAfter and moveBefore for consistent model event behavior (#200)
  • Drop support for PHP 8.1 (EOL)
  • Drop support for Laravel 9 (EOL)

Breaking changes

  • Minimum PHP version is now 8.2
  • Minimum Laravel version is now 10
  • moveAfter and moveBefore now fire model events (previously used saveQuietly())
4.5.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.5.1...4.5.2

4.5.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.5.0...4.5.1

4.5.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.4.2...4.5.0

4.4.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.4.1...4.4.2

4.4.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.4.0...4.4.1

4.4.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.3.0...4.4.0

4.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.2.0...4.3.0

4.2.0

What's Changed

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.1.1...4.2.0

4.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/eloquent-sortable/compare/4.0.2...4.1.0

4.0.1
  • support Laravel 9
4.0.0
  • require PHP 8+
  • drop support for all PHP 7.x versions
  • use PHP 8 syntax
3.11.0
  • add methods to determine whether element is the last or first in order (#102)
3.10.0
  • add support for PHP 8.0
  • drop support for Laravel 5.8
3.9.0
  • add config file
3.8.3
  • add support for Laravel 8
3.8.2
  • reduce dependency tree (#89)
3.8.1
  • models don't always have an id as key, use getKey instead
3.8.0
  • add support for Laravel 7
3.7.0
3.6.0
  • allow setNewOrder to accept a custom sort column
3.5.0
3.4.4
3.4.3
  • add support for Laravel 5.7
3.4.2
  • add support for L5.6
  • drop support for anything lower that L5.5
3.4.1
  • fix deps
3.4.0
  • add compatibility with Laravel 5.5
3.3.0
  • add buildSortQuery()
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai