occtherapist/advanced-table-export-for-filament

Export and print Filament admin tables to CSV, XLSX, and PDF — Filament v4/v5 compatible successor to filament-export.

Maintainers

Package info

github.com/OccTherapist/advanced-table-export-for-filament

Documentation

pkg:composer/occtherapist/advanced-table-export-for-filament

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.3.0 2026-06-19 18:05 UTC

This package is auto-updated.

Last update: 2026-06-19 18:08:18 UTC


README

Latest Version on Packagist Total Downloads License PHP Version

Export and print Filament admin tables in seconds — CSV, XLSX, and PDF with column selection, preview, and flexible PDF drivers.

Built for Filament v4 and v5 on Laravel 11/12. A modern, actively maintained successor to the export workflow many teams relied on with alperenersoy/filament-export.

Why this package?

Need This package
Export filtered, sorted, searched table data (not just selected rows) Header action exports the current table query
Export only selected rows Bulk action for row selection
CSV, XLSX, PDF from one modal Single action with format picker
Choose columns before export Built-in column filter in the export modal
PDF with portrait or landscape Configurable orientation per export
Multiple PDF backends Sidecar, Browsershot, Dompdf, or null driver
Filament v4/v5 without waiting on upstream First-class support from day one
German & English UI Translations included

Filament's native export action is powerful for queued, notification-based exports with custom exporter classes. This package targets teams that want a lightweight, modal-based export directly from the table — similar to filament-export, but updated for current Filament APIs.

Features

  • Header action — export the full filtered/sorted table state
  • Bulk action — export only selected records
  • Formats — CSV, XLSX, PDF (print-ready)
  • Column picker — let users choose which columns to include
  • Custom file names — optional filename input with timestamp prefix
  • PDF orientation — landscape or portrait
  • Pluggable PDF renderers — Sidecar Browsershot, local Browsershot, Dompdf
  • Row limits — configurable caps for PDF and spreadsheet exports
  • Panel plugin — central limits and defaults per Filament panel
  • i18n — English and German translations out of the box
  • Preview UI — paginated preview in the export modal

Requirements

  • PHP 8.2+
  • Filament 4 or 5
  • Laravel 11 or 12

Optional (pick one PDF stack):

Driver Packages
sidecar spatie/laravel-pdf, wnx/sidecar-browsershot
browsershot spatie/laravel-pdf, spatie/browsershot
dompdf dompdf/dompdf
null No PDF dependencies (default)

Spreadsheet exports use OpenSpout (included).

Installation

composer require occtherapist/advanced-table-export-for-filament

Register the plugin in your panel provider (e.g. app/Providers/Filament/AdminPanelProvider.php):

use Filament\Panel;
use OccTherapist\AdvancedTableExportForFilament\AdvancedTableExportForFilamentPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            AdvancedTableExportForFilamentPlugin::make()
                ->maxPdfRows(200)
                ->maxExportRows(2000)
                ->previewPerPage(25),
        ]);
}

Add the actions to any table:

use OccTherapist\AdvancedTableExportForFilament\Actions\TableExportBulkAction;
use OccTherapist\AdvancedTableExportForFilament\Actions\TableExportHeaderAction;
use Filament\Tables\Columns\TextColumn;

public function table(Table $table): Table
{
    return $table
        ->headerActions([
            TableExportHeaderAction::make()
                ->modifyExportQueryUsing(fn ($query) => $query->where('is_active', true)),
        ])
        ->toolbarActions([
            TableExportBulkAction::make()
                ->withColumns([
                    TextColumn::make('internal_notes')->label('Notes'),
                ]),
        ]);
}

TableExportHeaderAction exports the filtered, sorted, and searched table query. TableExportBulkAction exports only the selected rows. Use withColumns() to include extra model columns that are not visible in the table.

Publish the config (optional):

php artisan vendor:publish --tag=advanced-table-export-for-filament-config

Set your PDF driver in .env:

ADVANCED_TABLE_EXPORT_PDF_RENDERER=sidecar

Configuration

All options live in config/advanced-table-export-for-filament.php:

Key Default Description
default_format xlsx Default export format
default_page_orientation landscape PDF orientation
time_format M_d_Y-H_i Timestamp suffix for generated filenames
max_pdf_rows 200 Max rows for PDF exports
max_export_rows 2000 Max rows for CSV/XLSX exports
csv_delimiter , CSV field delimiter
pdf_renderer null PDF driver: sidecar, browsershot, dompdf, null
disable_preview false Hide preview section in modal
disable_filter_columns false Hide column picker
disable_file_name false Hide filename input
disable_file_name_prefix false Disable timestamp prefix on filenames
disable_additional_columns false Disable extra column inputs
preview_per_page 25 Preview pagination size (v0.2.0)
action_icon heroicon-o-arrow-down-on-square Action button icon

Panel-level limits override config when set on the plugin:

AdvancedTableExportForFilamentPlugin::make()
    ->maxPdfRows(500)
    ->maxExportRows(10000)
    ->previewPerPage(50);

PDF rendering

The package resolves a PdfRenderer contract from the container based on pdf_renderer:

// config/advanced-table-export-for-filament.php
'pdf_renderer' => env('ADVANCED_TABLE_EXPORT_PDF_RENDERER', 'null'),
Driver Best for
sidecar Production on AWS Lambda via Sidecar Browsershot
browsershot Local/dev with Chrome via Browsershot
dompdf Simple HTML-to-PDF without a headless browser
null Development until PDF export ships in v0.2.0

Migrating from filament-export

If you used alperenersoy/filament-export on Filament v2/v3, this package offers a familiar workflow for Filament v4/v5:

- use AlperenErsoy\FilamentExport\Actions\FilamentExportHeaderAction;
- use AlperenErsoy\FilamentExport\Actions\FilamentExportBulkAction;
+ use OccTherapist\AdvancedTableExportForFilament\Actions\TableExportHeaderAction;
+ use OccTherapist\AdvancedTableExportForFilament\Actions\TableExportBulkAction;

  ->headerActions([
-     FilamentExportHeaderAction::make('export'),
+     TableExportHeaderAction::make(),
  ])
  ->toolbarActions([
-     FilamentExportBulkAction::make('export'),
+     TableExportBulkAction::make(),
  ])

Many disable* options from the original package map directly to config keys (see Configuration) or can be set per action via method chaining (see Action customization).

Action customization

Both export actions support a fluent API similar to filament-export:

use Filament\Tables\Columns\TextColumn;
use OccTherapist\AdvancedTableExportForFilament\Actions\TableExportHeaderAction;
use OccTherapist\AdvancedTableExportForFilament\Enums\ExportFormat;

TableExportHeaderAction::make()
    ->fileName('monthly-report')
    ->timeFormat('Y-m-d')
    ->defaultFormat(ExportFormat::Pdf)
    ->defaultPageOrientation('portrait')
    ->disableCsv()
    ->disablePreview()
    ->directDownload()
    ->withHiddenColumns()
    ->csvDelimiter(';')
    ->withColumns([
        TextColumn::make('internal_notes')->label('Notes'),
    ])
    ->formatStates([
        'status' => fn ($record) => strtoupper((string) $record->status),
    ])
    ->extraViewData([
        'company' => 'Acme GmbH',
    ])
    ->fileNameFieldLabel('Report name')
    ->formatFieldLabel('Export as')
    ->filterColumnsFieldLabel('Included columns');
Method Description
fileName() Default file name
timeFormat() Timestamp format when the file name is generated automatically
disablePdf() / disableXlsx() / disableCsv() Hide export formats
defaultFormat() Default selected format
defaultPageOrientation() Default PDF orientation
directDownload() Skip the modal and export immediately with defaults
disableFilterColumns() Hide the column picker
disableFileName() Hide the file name input
disableFileNamePrefix() Disable automatic table-name prefix
disablePreview() Hide the paginated preview
disableTableColumns() Export only columns from withColumns()
withHiddenColumns() Include toggled-hidden table columns in exports
withColumns() Add extra model columns to the export
csvDelimiter() CSV delimiter for this action
formatStates() Override exported values per column
extraViewData() Extra variables for PDF/preview Blade views
modifyExportQueryUsing() Modify the export query before fetching records

Action-level settings override global config values.

Roadmap

Version Focus
v0.3.0 (current) Fluent action API, directDownload(), formatStates(), extraViewData()
v0.4.0 Custom PDF/preview Blade publishing, writer hooks

Star or watch the repository to follow progress: github.com/OccTherapist/advanced-table-export-for-filament

Contributing

Contributions are welcome! See CONTRIBUTING.md for setup and guidelines.

Found a bug or missing feature? Open an issue.

Changelog

See CHANGELOG.md for release notes.

License

MIT © Igor Clauss

Author

Igor Clauss — Laravel & Filament developer

Built with care for teams who need reliable table exports in modern Filament panels.