Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Action Export

Filament Action Export Laravel Package

jeffersongoncalves/filament-action-export

Export Filament tables to CSV, XLSX, and PDF with preview, print support, and full customization. Adds a bulk export action to your tables, with optional config, view, and translation publishing. Supports Filament 3.x, 4.x, and 5.x.

View on GitHub
Deep Wiki
Context7

Filament Action Export adds powerful export capabilities to your Filament tables, letting you download data as CSV, XLSX, or PDF directly from a bulk or table action. It includes a built-in preview and print support, so users can inspect results before saving, and every aspect of the action is fully customizable.

  • Supports CSV, XLSX, and PDF exports out of the box
  • Built-in preview modal and print support
  • Configurable export action with full customization options
  • Publishable config, views, and translations
  • Compatible with Filament 5.x on PHP ^8.2
Frequently asked questions about Filament Action Export
How do I add export actions to a Filament table?
Use the `exportAction()` method in your Filament table definition. For bulk exports, add it to `bulkActions()`, and for header actions, use `headerActions()`. The package provides built-in CSV, XLSX, and PDF export options with preview/print support. Example: `$table->bulkActions([ExportAction::make()])`.
Which Laravel and Filament versions does this package support?
The package is compatible with **Filament v5.x** and requires **PHP 8.2+**. For Filament 3.x/4.x, use versions 1.x/2.x respectively. Always check the [compatibility table](https://github.com/jeffersongoncalves/filament-action-export#compatibility) in the README for exact version mappings.
Can I customize the exported columns or data before export?
Yes. Use the `modifyQueryUsing()` method to alter the query before export, or override the `getExportedColumns()` method to filter columns. For advanced transformations, use the `modifyExportDataUsing()` callback to manipulate the final dataset.
How do I handle large datasets (e.g., 50K+ rows) without timeouts?
The package uses chunking by default (1,000 rows per batch). For larger exports, increase the `chunk_size` in the config or implement custom chunking logic via `modifyQueryUsing()`. Monitor memory usage with Laravel Telescope and consider optimizing queries with `with()` or `select()` to reduce payload size.
Does this package support PDF customization like headers, footers, or merged cells?
Basic PDF customization is supported via Blade templates (publish views with `php artisan vendor:publish`). For advanced layouts (e.g., merged cells, custom fonts), you’ll need to extend the package or use external libraries like `dompdf` with custom CSS. The package relies on `dompdf`/`snappy` for PDF generation.
How do I restrict export actions to specific user roles?
Use Filament’s built-in authorization system. Wrap the `ExportAction` in a `Gate` or `Policy` check, or leverage Filament’s `canAccessAction()` method. Example: `ExportAction::make()->canAccessAction(fn () => auth()->user()->can('export-data'))`.
What if I need to export data from a non-Eloquent source (e.g., API responses, collections)?
The package works with any iterable data (arrays, collections). Pass your custom data to the export action using `exportAction()->modifyExportDataUsing()` or override the `getExportData()` method in your table class to return your desired dataset.
How do I integrate this with Laravel Mix/Vite for asset compilation?
The package registers its JS/CSS assets via the `FilamentActionExportServiceProvider`. If using Vite, ensure the `filament-export.js` file is included in your `resources/js/app.js`. For Mix, add it to `webpack.mix.js` and run `npm run dev` or `npm run build`.
Are there alternatives to this package for Filament exports?
Yes. For CSV/XLSX, consider `spatie/laravel-excel` (headless, no UI). For PDFs, `barryvdh/laravel-dompdf` offers more control but lacks Filament integration. This package stands out for its **Filament-native UI** (modals, preview) and seamless action integration.
How do I debug issues like blank exports or corrupted PDFs?
Start by checking the `filament-action-export.log` for errors. For PDF issues, verify `dompdf`/`snappy` dependencies are installed and fonts are accessible. Use `telescope:clear` and re-test. If using custom templates, ensure Blade views are published and paths are correct.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource