- How do I install and configure filament-sort-order in a Laravel Filament panel?
- Install it with Composer using ibrahimbougaoua/filament-sort-order, register the package's service provider or Filament plugin in your panel provider, add the order column to the resource table, and enable reordering on that table. Because it is a thin Filament table-layer plugin, setup is usually a panel registration plus a table modifier and a default sort, measured in hours rather than days. Pin the exact version you tested against, since the package is tightly coupled to Filament internals.
- Does filament-sort-order support Filament v3, and what is its upgrade policy?
- It is built as a Filament v3 table extension, but check the composer.json version constraint rather than trusting the README before installing. The package hooks into Filament's table row-reordering and Alpine drag-and-drop surface, which changed between Filament 2 and 3 and will change again, so treat it as a version-locked extension of your Filament minor. There is no documented support matrix in the repository, so confirm supported majors and minors with the maintainer.
- Do I need to add a migration or sort column before using filament-sort-order?
- The package ships no migrations, so 'no extra migrations required' means you still own the schema. Add a non-nullable integer sort column with a sensible default, backfill existing rows deterministically, and add a composite unique index on scope column plus sort_order. Then set the table's default sort to that column ascending with id as a stable secondary key so pagination stays deterministic.
- How does filament-sort-order persist the new row positions after a drag and drop?
- Persistence is handled by a handler that writes the new positions back to your configured order column. Ask the maintainer whether a drop issues N per-row PATCH requests or one batched payload, whether it runs inside a transaction, and whether it renumbers densely or leaves gaps. Per-row dense renumbering on a large table means write amplification and lock contention, and a partial failure can leave a corrupted sequence.
- Does the drag-and-drop reorder endpoint respect Filament resource authorization and tenancy?
- The persistence almost certainly hits a dedicated endpoint separate from normal resource update routes, so confirm it re-applies the resource's update policy and tenant scoping. If it does not, an editor who can merely see a row may be able to reposition it without update permission. Test this explicitly with a read-only or limited role before shipping to production.
- How does filament-sort-order behave with table filters, pagination, and scoped lists?
- This needs a maintainer spike: check whether reordering a filtered or paginated subset renumbers globally or only within the visible slice. Flat single-scope lists are the safest assumption, and per-parent or per-tenant sequences need confirmed scoping support. Also test tie-breaking when duplicate sort values exist, soft-deleted rows holding positions, and a nullable sort column.
- Can two admins reorder the same table at once without losing the order?
- No optimistic locking is implied by the package description, so two editors reordering the same list will produce last-write-wins order loss. If that matters, serialize reordering through your own action or refresh the table before saving. Ask the maintainer whether the saved payload includes any version or updated_at check.
- How should I backfill and index the sort column for filament-sort-order?
- Backfill with a deterministic ordering such as ROW_NUMBER() OVER (PARTITION BY scope ORDER BY existing_criterion), then space values by 100 so there is room to insert between rows. Add a composite unique index on scope and sort_order, and keep a stable secondary sort key so pagination is deterministic. Spaced values reduce how often a full renumber is needed, which matters on large tables.
- Does filament-sort-order ship compiled assets or require a Vite build step?
- Check on day one whether the package ships pre-built assets or expects you to build its JavaScript into your panel theme via Vite. Pre-built assets drop in with no frontend toolchain change, while a required build step is a real integration and deployment cost. The answer affects both your pipeline and how you version assets across Filament upgrades.
- Is filament-sort-order actively maintained and tested, and what are the alternatives?
- Adoption is low at around 22 stars, there is one maintainer, the last release was 2024-09-24, and there is no visible CI or test coverage, so assume no upstream fixes; the MIT license lets you vendor or fork it. For simpler cases, evaluate Filament's native reorderable table support first and only add this package if you need its specific behaviour. Either way, pin the version and cover reordering with your own tests.