xingchuangyang/dcat-admin-sortable
xingchuangyang/dcat-admin-sortable is a Laravel/Dcat Admin extension that adds drag-and-drop row sorting to admin list grids. Reorder records directly in the table and persist their positions via a sortable field, with straightforward installation and configuration for Dcat Admin projects.
order/sort column. Admins stop hand-typing integers and stop filing "how do I move this to the top?" tickets. High perceived value, low effort, near-zero blast radius on customer-facing code.Adopt when:
SortableGrid helper, and accept that we will likely fork it (acme/dcat-admin-sortable) rather than wait on upstream.Look elsewhere when:
kalnoy/nestedset; flat sort columns degrade badly under nesting.Practical gate before committing: verify Laravel/PHP/Dcat constraints in composer.json against our version matrix; confirm the Composer package name actually maps to this repository (package name dcat-admin-sortable and repo name doct-admin-sortable diverge — a provenance red flag); confirm the reorder endpoint inherits Dcat auth middleware and per-resource policy (not a superuser bypass); confirm no mass assignment on the sort column; and confirm the license permits forking.
To executives (one paragraph): This is a small, low-cost admin capability that lets content and catalog teams reorder items visually instead of editing numbers — a recurring source of support tickets and slow merchandising work. It touches only internal tooling, is fully reversible, and costs us a dependency rather than a build. The recommendation is a timeboxed pilot in one admin module; if usage justifies it, we fold the roughly 1–2 days of logic into our own codebase and drop the dependency. Downside is bounded: worst case we lose a day, and no customer-facing surface is affected. It also unblocks several roadmap epics that quietly depend on manual ordering (content ordering, navigation builders, merchandising) without consuming a dedicated sprint.
To engineering (the real pitch): It's a thin Dcat Admin extension — sortable grid rows plus a persistence endpoint — small enough to read in an afternoon and fork if the maintainer goes quiet (5 stars, 0 dependents, single maintainer: treat as unmaintained-by-default). Proposal: pin the exact version, fork into our namespace at adoption rather than after the first Dcat upgrade breaks it, wrap the calls behind an internal SortableGrid helper so we can swap implementations without touching call sites, and treat the sort column as our own contract — indexed unsignedInteger, NOT NULL DEFAULT 0, backfilled deterministically from a stable key, default scope orderBy('sort')->orderBy('id') for stable tie-breaking, plus an ordered() scope so no call site forgets. Add integration tests on the reorder endpoint covering ordering correctness, authorization/CSRF under a real admin session, pagination and filter scoping, NULL/duplicate keys, and concurrent writes. Keep a manual fallback (edit the sort field in the form) so ordering never hard-depends on the JS asset, and put a two-sprint review on the calendar: keep, fork, or replace. The main technical risk isn't complexity — it's the reorder write pattern (O(n) rewrites per drag, non-transactional, last-write-wins under concurrent admins) and Dcat upgrade breakage on grid-tool registration; both are cheap to contain if we own the code from day one.
Recommendation: Adopt conditionally — scoped to internal admin surfaces, forked and version-pinned from day one, behind a feature flag, starting with the single list where manual ordering has the clearest stakeholder ask. Do not let it become load-bearing infrastructure without first exercising the fork path.
How can I help you explore Laravel packages today?