lifeonscreen/nova-sort-relations
A Laravel Nova package for sorting related models. It adds drag-and-drop reordering of hasMany and belongsToMany relationships directly on resource detail pages, saving sort order automatically. Ideal for managing ordered lists like menu items, gallery images, or featured posts without custom code.
orderBy logic per endpoint.sortableRelations method (with a default sort) lets you declare, in one place, which relations are sortable and what the fallback ordering is. That directly informs whether to expose relation-level sorting in admin panels, list APIs, and reporting views.orderBy (whitelisted sortable relations reduce injection/abuse surface).orderBy suffices); you require advanced multi-column/relation sorting semantics not covered by this package; or you cannot absorb breaking changes on minor version bumps.sortableRelations (how defaults interact with request input and multi-relation sorting), test coverage, and whether it validates unknown relations.sortableRelations method with a default centralizes the sortable-relation allowlist and fallback ordering, cutting per-endpoint boilerplate and making ordering behavior explicit and testable. Because it is pre-1.0, we should pin the version, keep usage behind a thin adapter, and review changelogs before upgrades.How can I help you explore Laravel packages today?