- How do I install marshmallow/nova-sortable in a Laravel Nova application?
- Install the package with Composer, publish its JavaScript and CSS assets into Nova's asset pipeline, and add an integer ordering column to the model's table if one does not already exist. Then apply the package's trait or scope to the model and enable the sortable behavior on each Nova resource that needs drag-and-drop ordering. The overview describes setup as simple, but confirm the exact commands and configuration against the repository README before relying on them.
- Which Laravel Nova versions are supported by nova-sortable?
- The provided context does not include a verified compatibility matrix for Nova, PHP, or Laravel versions. Nova asset compilation differs between Vue 2 in older Nova releases and Vue 3 in Nova 4 and 5, so a package built for one Nova major can break silently after an upgrade. Verify supported versions in the repository and test both the reorder UI and persistence after any Nova upgrade.
- Does nova-sortable require an extra database table or migration?
- The package does not appear to add its own table; it persists ordering against an ordinal column such as sort_order on the model's existing table. You still need that integer column, so add it with a migration if your model does not already have one. Confirm the expected column name and trait configuration in the package documentation.
- How does nova-sortable save the new row order?
- Dragging rows in the Nova index view sends the new sequence, and the package persists it automatically against the sortable column. The provided context does not confirm whether the write is a single-row update, a bulk update, or a full reindex, nor whether it is transactional. Review the source before relying on it for large tables or strict ordering guarantees.
- Does nova-sortable respect global scopes and multi-tenant ordering?
- This is the key behavior to verify: a reorder must honor model global scopes, tenancy constraints, and relationship constraints. The technical evaluation explicitly warns that a reorder ignoring tenancy scopes can silently corrupt ordering across customers. Test reordering with your actual global scopes and tenant filters before production use.
- Is drag-and-drop reordering in Nova authorized by policy or ability?
- The context does not confirm whether reordering is authorization-gated. Without an explicit policy or ability check, any Nova user with index access may gain reorder rights. Verify the package's authorization behavior and add guards if some admin roles should have read-only index access.
- Can I use nova-sortable with paginated or filtered Nova index views?
- Reordering within a paginated or filtered index is a known UX trap because positions computed against a partial result set can be wrong. The package injects sorting into the index view, but the context does not state how it handles pagination or active filters. Restrict reordering to full, unfiltered views or test carefully before enabling it broadly.
- What happens if two admins reorder records at the same time?
- Concurrent drag-and-drop reorder writes a whole ordinal sequence, so without transactional, idempotent handling two admins can produce duplicate or gapped positions. The technical evaluation flags this as a correctness concern and does not confirm the package's write strategy. Review the implementation or add serialization or locking if concurrent admin edits are possible.
- Is marshmallow/nova-sortable production-ready and actively maintained?
- Adoption signals are near zero: the provided context shows 0 stars and 0 dependents, and the package appears to be effectively single-maintainer. Release metadata is anomalous, including a future-dated release that should be verified before trusting versioning. Treat it as a small, auditable utility and review the source before production adoption.
- Does native Laravel Nova already support sortable resources, making this package redundant?
- Nova has progressively added sortable capabilities, including resource-level sortable flags and sortable BelongsTo relations. If native support covers your stored ordinal use case, this package is redundant and adds integration risk for no benefit. Inventory each candidate resource as stored ordinal, derived order, or no ordering need before deciding.