Easily add drag and drop sorting functionality to your Livewire components with an Alpine directive, powered by Sortable.js.
We’ll start with a list of ordered items, activate drag and drop sorting, and then feed the new order back to Livewire to instantly update the database.
Once you’re done, you’ll be able to reuse this functionality in any of your Livewire components.