Laravel Reorderable is a package that adds drag-and-drop sorting to Eloquent models. It provides a HasSortOrder trait and ReorderableContract interface, ready-made Blade and Livewire components, and automatic persistence of sort positions via a built-in route. Features include grouped reordering scoped to parent models, programmatic position control via moveToPosition() and reorderFromArray(), an artisan generator command for scaffolding, authorization via closure, and an ItemsReordered event for cache busting or audit logging. Requires PHP 8.3+, Laravel 13+, and Livewire 4+.

3m read timeFrom laravel-news.com
Post cover image
Table of contents
# Blade and Livewire Components# Grouped Reordering# The Generator Command# Authorization and Events# Requirements
1 Comment

Sort: