Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Dcat Admin Sortable

Dcat Admin Sortable Laravel Package

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.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Dcat Admin Sortable
How do I install xingchuangyang/dcat-admin-sortable in a Laravel Dcat Admin project?
Install it with Composer, then register the extension in your config/admin.php the same way other Dcat Admin extensions are registered. Add an indexed integer sort column to the target table through your own migration, backfill existing rows deterministically, and attach the drag tool to the grid you want to reorder. Before locking anything in, confirm that the Composer package name actually resolves to the advertised repository, since the package name and repository name differ.
Does xingchuangyang/dcat-admin-sortable work with Laravel and any admin panel, or only Dcat Admin?
It is a Dcat Admin extension rather than a general-purpose Laravel sorting library, so it only applies if your application is built on Dcat Admin 2.x. On Nova, Filament, Backpack, or a custom admin, it is a non-fit because those ecosystems already provide reorderable tables. Check the composer.json constraints for supported Laravel, PHP, and Dcat Admin versions against your own version matrix before adopting it.
How do I configure the sort column and initial sort direction?
The package supports a configurable sort column and initial direction, which you set in the grid definition rather than in a separate config file. Your table needs a matching indexed integer column, typically an unsigned integer defaulting to zero, created through your own migration. Backfill that column with deterministic values and add a stable tie-breaker in your model's default scope so ordering stays consistent.
What happens to drag-and-drop sorting when the grid is paginated or filtered?
Pagination- and filter-scoped reordering is the highest-risk area, because naive implementations can produce duplicate or NULL sort keys that surface to users as an intermittent "the drag didn't save" bug. Because the failure is data-dependent and intermittent, it is one of the more expensive issues to diagnose in production. Test reordering explicitly across pages, with active filters, and on tree or nested grids before relying on the tool.
Is the AJAX reorder endpoint secure and does it enforce authorization?
The persistence endpoint accepts row identifiers and positions, so it must inherit Dcat Admin's auth middleware and the resource's authorization policy rather than bypassing them. It should also block mass assignment on the sort column and reject cross-resource writes. Verify behavior under a real admin session with a non-superuser role instead of testing only as a superuser, and confirm CSRF protection is active.
Does xingchuangyang/dcat-admin-sortable handle two administrators reordering the same table at once?
The package does not model concurrency, so the write path is yours to own. Naive implementations rewrite every affected row's sort value per drag, which is O(n) writes, non-transactional, and degrades into silent last-write-wins when two admins reorder simultaneously. Wrap the persistence in a transaction and decide on a locking or versioning strategy if concurrent editing matters for your largest ordered table.
How should I test drag-and-drop sorting before shipping it to production?
Plan a short spike, roughly half an engineer-day to one engineer-day including QA, and confirm the exact Grid API surface the package hooks into against the README first. Test reordering across pagination and active filters, two concurrent admin sessions, a non-superuser role, and a table sized like your largest ordered table. Also confirm the endpoint rejects unauthorized and cross-resource requests.
Is the package actively maintained, and should I fork it instead of depending on upstream?
Adoption is effectively zero: a handful of stars, no dependents, a single maintainer, and thin documentation, so there is no community bug surface and no external pressure to track Dcat Admin releases. The realistic planning assumption is that you own the code from the day you adopt it, and grid tool registration APIs are the most likely breakage point on Dcat minor upgrades. Forking at adoption, pinned to a version, is safer than waiting for the first breakage.
What are the alternatives if I just need sortable rows in a Laravel admin panel?
If you are not on Dcat Admin, use the native reorderable table features in your admin framework rather than importing a Dcat plugin. If you are on Dcat Admin, the practical alternative is implementing a small drag tool over your own sort column, which is a modest amount of work and removes upstream risk entirely. Since the package is a UI affordance layered on an ordering field you should own anyway, the custom route is viable.
Can I use xingchuangyang/dcat-admin-sortable commercially, and is the license forkable?
Confirm the license explicitly permits an internal fork before adopting, because forking is the recommended maintenance strategy. Also resolve the provenance question: the Composer package name and the repository name diverge, so verify the package resolves to that source and that published tags are immutable. Treat a clear answer on both points as a gate before any integration work begins.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource