- What is kraenkvisuell/nova-sortable used for in Laravel Nova?
- It adds drag-and-drop row sorting to a Laravel Nova resource index view. Developers can reorder records directly in the admin list and persist that order through a configurable database column. It is useful for resources where manual ordering matters, such as menus, categories, slides, or featured items.
- How do I install kraenkvisuell/nova-sortable?
- Install the package with Composer using composer require kraenkvisuell/nova-sortable. Then follow the package README to enable the sortable behavior on your Nova resource and make sure the underlying model has an order column available. Because it is a Nova package, it should be installed in an application that already has Laravel Nova configured.
- Which Laravel and Nova versions does this package support?
- Compatibility depends on the package's Composer constraints and the Laravel Nova version used by your application. Check the package composer.json and repository release notes before upgrading Nova or Laravel. Nova is a commercial package, so major Nova releases can require corresponding updates from community packages.
- How does nova-sortable save the new order after dragging rows?
- The package persists the new position through a configurable order column on the model's database table. When rows are reordered in the Nova index view, the package updates the stored positions so the order survives page refreshes. You should add or confirm the order column before enabling sorting on a resource.
- Do I need custom JavaScript to reorder Nova resource rows?
- No custom JavaScript is required for the basic drag-and-drop index sorting described by the package. The package provides the Nova index interaction, so developers configure the resource and database column rather than building a separate frontend sorter. You should still test the behavior in your own Nova setup and browser targets.
- Can I use kraenkvisuell/nova-sortable with existing records?
- Yes, but existing records need sensible values in the order column before sorting is useful. Backfill the column with an initial sequence, such as by primary key or current display order, and then enable drag-and-drop in Nova. After that, reordering in the index view should update the stored positions.
- How should I test drag-and-drop sorting in a Laravel Nova resource?
- Open the Nova resource index, drag rows into a new sequence, refresh the page, and confirm the order remains stable. Also inspect the database order column to verify the persisted values match the visible sequence. For automated coverage, add tests around the model ordering logic and any package endpoints or actions used by your resource.
- What production concerns should I check before using nova-sortable?
- Confirm that Nova policies and authorization still restrict who can reorder records. Check that the order column has an appropriate database type and, if needed, an index for queries that sort by it. Also consider concurrent admin edits and decide whether your application needs additional locking or conflict handling.
- What are alternatives to kraenkvisuell/nova-sortable for Laravel Nova?
- Alternatives include other community Nova sortable packages or building a custom Nova tool with your own drag-and-drop JavaScript. Laravel Nova's default index view does not provide manual drag-and-drop ordering out of the box, so the choice is usually between a small package like this and a custom implementation. Evaluate maintenance, Nova version compatibility, and whether the package matches your order-column conventions.
- Is kraenkvisuell/nova-sortable actively maintained?
- Check the GitHub repository for recent commits, releases, open issues, and declared Nova version constraints. Because Nova packages depend on Nova's internal APIs, maintenance matters most when you upgrade Nova or Laravel. Review the README and issue history before adopting it for a long-lived production admin panel.