Remember Table
CommunityLet users save a table's filters, search, sorting, grouping and visible columns as named views they can switch between, share and set as default.
Author:
msehsah
Package health
BetaAutomated checks of this plugin's Composer package
15 checks
- Skipped: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Skipped: Dependabot or Renovate configured
- Skipped: Dependency update cooldown configured
- Failed: Provides a security policy — View details on Plumb
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
^8.2supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- Requirements
- Installation
- Usage
- What is saved
- Configuration
- How it behaves
- Customizing the actions
- Testing
- Roadmap
- Changelog
- License
Let your users save the way they like a Filament table (filters, search, sorting, grouping, visible columns) as named views, and switch between them in one click.
- Save the current table as a named view
- Switch views from a dropdown in the page header
- Update, rename, reorder and delete views
- Set a default view that opens automatically
- Define preset views in code
- Share a view with every user of the panel
- Shareable links: the active view lives in the URL (
?view=12) - Multi-tenancy aware
- English and Arabic translations, RTL friendly
#Requirements
- PHP 8.2+
- Filament 5.x
#Installation
composer require sehsah/filament-remember-table
php artisan filament-remember-table:install
The install command publishes the config and migration and asks to run the migration. You can also do it by hand:
php artisan vendor:publish --tag="filament-remember-table-config"
php artisan vendor:publish --tag="filament-remember-table-migrations"
php artisan migrate
#Usage
Add the trait to a page that has a table (usually a resource's list page) and put the actions in the header:
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;
use Sehsah\FilamentRememberTable\Concerns\HasRememberTable;
class ListOrders extends ListRecords
{
use HasRememberTable;
protected static string $resource = OrderResource::class;
protected function getHeaderActions(): array
{
return [
...$this->getTableViewActions(),
CreateAction::make(),
];
}
}
That's it. A Views button appears in the page header.
#Preset views
Views defined in code show up for everyone and can't be edited or deleted by users:
use Sehsah\FilamentRememberTable\PresetView;
public function getPresetTableViews(): array
{
return [
PresetView::make('Pending orders')
->icon('heroicon-o-clock')
->filters(['status' => ['value' => 'pending']])
->sort('created_at', 'desc')
->default(), // used when the user has no default of their own
PresetView::make('Big spenders')
->filters(['total' => ['total_from' => 1000]])
->hiddenColumns(['notes'])
->visibleColumns(['customer.email'])
->grouping('customer.name'),
];
}
filters() takes the raw filter form state, keyed by filter name. For a SelectFilter or TernaryFilter that is ['value' => ...]; for a multiple SelectFilter it is ['values' => [...]]; for a custom filter it is whatever its form fields are named.
Other preset options: search(), tab() (a key from the list page's getTabs()), perPage() and key() (a stable id for the URL).
#Several tables on one page
Views are stored per page class. If you reuse the same page class for different tables, override the key:
public function getTableViewsKey(): string
{
return static::class . ':' . $this->type;
}
#What is saved
| Part | Config key | Default |
|---|---|---|
| Filters | filters |
on |
| Global search | search |
on |
| Per-column searches | column_searches |
on |
| Sort column and direction | sort |
on |
| Grouping | grouping |
on |
| Column visibility and order | columns |
on |
| List page tab | tab |
on |
| Records per page | per_page |
off |
Turn parts on or off in config/remember-table.php under remember.
Saved views are validated when they are applied: filters, columns, groups and tabs that no longer exist on the table are ignored, and columns you added after a view was saved still show up.
#Configuration
return [
'table_name' => 'remember_table_views',
'model' => \Sehsah\FilamentRememberTable\Models\TableView::class,
'remember' => [ /* see table above */ ],
'allow_public_views' => true, // "Share with everyone" toggle
'apply_default_view_on_load' => true,
'scope_to_tenant' => true, // separate views per Filament tenant
'max_views_per_table' => 50, // per user; null for no limit
];
#How it behaves
- Default view: applied when a user opens the table, unless the URL already has table state (
?filters=,?search=,?sort=,?tab=...), so links to a filtered table keep working. - Modified indicator: after applying a view, changing the table shows
View name (modified)on the button, and Update current view appears for views the user owns. - Shared views: other users can apply them, and they are labelled Shared. Only the owner can update, rename or delete them.
- Reset table: clears the active view and puts the table back to its defaults.
#Customizing the actions
Each action is a normal Filament action. To tweak one, alias the trait method and wrap it:
use HasRememberTable {
saveTableViewAction as baseSaveTableViewAction;
}
public function saveTableViewAction(): \Filament\Actions\Action
{
return $this->baseSaveTableViewAction()->modalWidth('lg');
}
Available: saveTableViewAction(), updateTableViewAction(), manageTableViewsAction(), resetTableViewAction().
#Testing
composer test
#Roadmap
- Team-level sharing (share with specific roles or users)
- Record count badges on views
- Views as tabs above the table
- A panel page listing all views
- Import / export views as JSON
#Changelog
See CHANGELOG.
#License
The MIT License (MIT). See License File.
The author
From the same author
Featured Plugins
A selection of plugins curated by the Filament team
Compact Theme
A theme that makes data-heavy panels easier to scan by fitting more useful information on each screen.
Filament
Blueprint
Filament Blueprint is a premium Laravel Boost extension that helps AI agents produce accurate, detailed implementation plans and security reports for Filament apps.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese