naxon/nova-field-sortable
naxon/nova-field-sortable is a Laravel Nova field for drag-and-drop sorting of resource records in index views. It lets editors reorder menus, categories, and other lists directly in Nova, with simple setup and an order column to store manual positions. Useful for any model that needs a custom displ...
Consider it when:
order / position / sort_order integer, and the requirement is flat, single-list reordering — not trees.Look elsewhere when:
position.->sortable() on index fields, $defaultSort) already satisfies the requirement. Then this initiative dies here — and that's the first thing to check, before any estimate is written.Executives. Editors can't change the order of [X] without opening a ticket — roughly [N] requests a month, plus added latency on routine content changes. A small MIT-licensed Nova field adds drag-to-reorder to the admin for about a day of setup, against roughly a sprint to build the same thing ourselves. The catch matters and should be said out loud: it hasn't shipped since 2018 and has essentially no user base, so we'd be adopting the code, not buying support — we own it, including every Nova upgrade. Recommendation: approve a short spike on one low-risk resource, measure the ticket drop, and expand only if the port proves cheap. Kill it if the spike runs past two days, or if Nova's native sorting already covers the need.
Engineering. It's one Nova field — a PHP Field subclass plus a compiled Vue component — that makes index rows draggable and persists position to an order column. Practically: do not composer require from Packagist. Vendor the source at a pinned commit, read the reorder route before trusting it (it is the entire security surface — treat it as an IDOR candidate and put the model's update policy in front of it), and wrap the write in a transaction with row locking. Do not stack it on spatie/eloquent-sortable; both want to own the order column and you'll get double-writes. Assume Nova 4/5 means a day or two porting resources/js/ to Vite — and treat exceeding two days as the signal to write a bespoke field, because the underlying logic is genuinely shallow. Name an owner, pin the commit, and note in the README how our fork diverges; the failure mode after a Nova upgrade is silence — the handle simply doesn't render and nothing errors — so keep a render smoke test as the canary.
How can I help you explore Laravel packages today?