sofa/laravel-sortable
A Laravel package for making Eloquent models sortable, letting you reorder records and persist their positions with minimal setup. Handy for drag-and-drop lists and custom sort columns.
position column plus move semantics. This package is a candidate implementation for that slice.position column, and move/swap methods. That is cheap to write in-house. The decision is less "is this package good" and more "does adopting it save us a sprint, and what does it cost us at upgrade time."spatie/eloquent-sortable covers the same ground with active maintenance — evaluate it first and treat this package as the fallback or the design reference.sofa/laravel-sortable, repository jarektkaczyk/eloquent-sortable, and metrics that don't match the well-known project of that name. Confirm you're evaluating the artifact you think you are before it enters the build.For executives: We need manual ordering in several places — menus, featured content, onboarding steps. The persistence layer for that is small and well understood; a candidate open-source package exists under a permissive MIT license. However, it was last released in 2016, has essentially no adoption, and will not run unmodified on our Laravel version. Recommendation: do not take it as a dependency. Either implement the ordering trait in-house (roughly one to two days of engineering, fully owned) or adopt the actively maintained equivalent. The decision is low-stakes in effort but worth getting right, because a stale package pinned into our models becomes an upgrade blocker for every future Laravel major.
For engineering: The package provides a Sortable trait — a position column, ordered query scopes, and move/swap operations, with optional grouping. It is a reference design, not a dependency. It predates modern PHP/Laravel typing and has no maintenance or downstream usage to validate against. Prefer an in-house trait or a maintained alternative; if we do reuse it, vendor and rewrite, and add row locking plus a uniqueness constraint on (group, position) so concurrent reorders can't corrupt ordering.
How can I help you explore Laravel packages today?