ページ · Laravilt
Reordering
Let users reorder rows with drag and drop.
php
The column defaults to sort_order. It must be an integer column on the model:
php
For resources, the panel registers a POST {resource}/reorder route that saves the new order. Outside a resource, point the table at your own endpoint with reorderRoute():
php
The endpoint receives items and column in the request body.
API reference
| Method | Description |
|---|---|
reorderable(?string $column = 'sort_order') | Enable drag-and-drop ordering |
reorderRoute(string $route) | Custom URL that saves the order |