Storage
Session vs database storage, and configuration priority.
The package provides two storage mechanisms. Each stores column widths, order, and pinned columns together for the authenticated user.
- Session storage (default) — stores settings in the user's session. No database required. Browser/device specific.
- Database storage (optional) — stores settings in the database. Requires the
table_settingsmigration. Works across browsers/devices for the same user.
Enable database storage in your panel configuration:
ResizedColumnPlugin::make()
->preserveOnDB(true) // Enable database storage
Configuration priority
When deciding whether to save to the database, the package checks configuration in this order. The first match wins.
| Priority | Method | Scope |
|---|---|---|
| 1 — Highest | ->preserveColumnWidthsInDatabase() table macro | Single table only |
| 2 | ResizedColumnPlugin::standalone() in AppServiceProvider | All components, no panel required |
| 3 — Lowest | ResizedColumnPlugin::make() in panel provider | Inside a Filament panel |
See Standalone Livewire for using the standalone and table-macro options outside a panel.