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.
moveBefore/moveAfter)Executives: "This package eliminates 20+ hours of development time for sorting features by providing a proven, maintainable solution. It reduces bug risk in critical user-facing ordering functionality (e.g., drag-and-drop reordering) while supporting enterprise-grade requirements like grouping and event-driven workflows. With 1,500+ stars and active maintenance, it's a low-risk investment that accelerates time-to-market for high-value features."
Engineering: "Integration takes minutes: just add the trait and configure. Handles edge cases like grouping, bulk reordering, and event dispatching out-of-the-box. Avoids reinventing sorting logic and benefits from Spatie's rigorous testing and Laravel ecosystem expertise. Recent updates ensure compatibility with Laravel 13 and modern PHP standards."
How can I help you explore Laravel packages today?