app-ark/eloquent-sortable
A Laravel package that adds sortable behavior to Eloquent models, letting you reorder records via a position column and move items up, down, or to any spot. Includes query scopes and helpers to keep ordering consistent automatically.
app-ark/eloquent-sortable is a Laravel package that adds effortless ordering to your Eloquent models. By applying the provided trait, any model gains a sortable position column, letting you reorder records with simple method calls instead of hand-written queries. It's ideal for drag-and-drop lists, custom menu ordering, and any dataset where sequence matters.
The package handles the tedious parts—shifting sibling records, inserting at arbitrary positions, and keeping ordering consistent—so your code stays clean. All operations are exposed through an intuitive API that integrates naturally with existing Eloquent models and queries.
How can I help you explore Laravel packages today?