Action Export
CommunityExport Filament tables to CSV, XLSX and PDF with preview, print support, and full customization.
Author:
Jefferson Gonçalves
Package health
BetaAutomated checks of this plugin's Composer package
15 checks
- Passed: 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
- Failed: Dependabot or Renovate configured — No dependency updater configuration found. View details on Plumb
- Skipped: Dependency update cooldown configured
- Passed: Provides a security policy
- 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 38 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Warning: 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
- Compatibility
- Installation
- Usage
- Configuration Options
- Config File
- Customizing Views
- Translations
- Testing
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License

Export Filament tables to CSV, XLSX and PDF with preview, print support, and full customization.
#Compatibility
| Package Version | Filament Version | PHP |
|---|---|---|
| 1.x | 3.x | ^8.1 |
| 2.x | 4.x | ^8.2 |
| 3.x | 5.x | ^8.2 |
#Installation
composer require jeffersongoncalves/filament-action-export "^3.0"
#Publish config (optional)
php artisan vendor:publish --tag=filament-action-export-config
#Publish views (optional)
php artisan vendor:publish --tag=filament-action-export-views
#Publish translations (optional)
php artisan vendor:publish --tag=filament-action-export-lang
#Usage
#Bulk Action
Add the export action to your table's bulk actions to allow users to export selected records:
use JeffersonGoncalves\FilamentExportAction\Actions\FilamentExportBulkAction;
use JeffersonGoncalves\FilamentExportAction\Enums\ExportFormat;
use JeffersonGoncalves\FilamentExportAction\ValueObjects\AdditionalColumn;
public function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name'),
TextColumn::make('email'),
])
->bulkActions([
FilamentExportBulkAction::make('export')
->formats([ExportFormat::Csv, ExportFormat::Xlsx, ExportFormat::Pdf])
->defaultFormat(ExportFormat::Xlsx)
->excludeColumns(['password', 'remember_token'])
->additionalColumns([
AdditionalColumn::make('exported_at')
->defaultValue(now()->format('d/m/Y')),
])
->extraViewData(['companyName' => 'Acme Corp']),
]);
}
#Header Action
Add the export action to your table's header actions to export all records (respecting active filters, search, and sort):
use JeffersonGoncalves\FilamentExportAction\Actions\FilamentExportHeaderAction;
use JeffersonGoncalves\FilamentExportAction\Enums\ExportFormat;
public function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name'),
TextColumn::make('email'),
])
->headerActions([
FilamentExportHeaderAction::make('export')
->formats([ExportFormat::Csv, ExportFormat::Xlsx, ExportFormat::Pdf])
->defaultFormat(ExportFormat::Xlsx)
->withFilters()
->withSearch()
->withSort()
->snappy()
->extraViewData(['companyName' => 'Acme Corp']),
]);
}
#Configuration Options
#Formats
->formats([ExportFormat::Csv, ExportFormat::Xlsx, ExportFormat::Pdf])
->defaultFormat(ExportFormat::Xlsx)
#File Name
// Custom file name
->fileName('my-report')
// File name prefix (prepended to the name)
->fileNamePrefix('users')
// Disable prefix
->disableFileNamePrefix()
// Custom time format for the filename suffix
->timeFormat('d_m_Y-H_i')
// Disable file name input in the modal
->disableFileName()
// Full control via closure
->fileNameUsing(fn ($action) => 'custom-' . now()->format('Y-m-d'))
#Direct Download
Skip the modal form and download immediately with default settings:
->directDownload()
#Columns
// Use specific columns
->columns(['id', 'name', 'email'])
// Exclude columns
->excludeColumns(['password', 'remember_token'])
// Add extra Filament Column objects
->withColumns([
TextColumn::make('full_address'),
])
// Disable the column filter checkboxes in the modal
->disableFilterColumns()
// Include hidden (toggled) columns in the export
->withHiddenColumns()
// Disable table columns entirely (use only additional columns)
->disableTableColumns()
#Additional Columns
Add extra columns with user-fillable inputs in the export modal:
->additionalColumns([
AdditionalColumn::make('exported_at')
->label('Exported At')
->defaultValue(now()->format('d/m/Y')),
AdditionalColumn::make('notes')
->label('Notes')
->defaultValue('N/A'),
])
// Disable additional columns
->disableAdditionalColumns()
#Format States
Custom formatting for column values:
->formatStates([
'name' => fn ($value, $record) => strtoupper($value),
'created_at' => fn ($value) => Carbon::parse($value)->format('d/m/Y'),
'status' => fn ($value) => match ($value) {
'active' => 'Active',
'inactive' => 'Inactive',
default => $value,
},
])
#CSV Delimiter
->csvDelimiter(';') // Default: ','
#PDF Driver
By default, the package uses barryvdh/laravel-dompdf. You can switch to barryvdh/laravel-snappy:
composer require barryvdh/laravel-snappy
// Use Snappy
->snappy()
// Or set driver explicitly
->pdfDriver('snappy')
// Custom PDF options
->pdfOptions(['paper' => 'a4', 'orientation' => 'landscape'])
#Page Orientation
// Set default page orientation for PDF export
->defaultPageOrientation('landscape') // Default: 'portrait'
#Preview & Print
// Disable preview in the modal
->disablePreview()
// Disable print button
->disablePrint()
#Writer Callbacks
Customize the Excel or PDF writer before the file is generated:
// Modify the SimpleExcelWriter (CSV/XLSX)
->modifyExcelWriter(fn (SimpleExcelWriter $writer) => $writer)
// Modify the PDF instance (DomPDF or Snappy)
->modifyPdfWriter(fn ($pdf) => $pdf->setWarnings(false))
#Extra View Data
Pass additional data to the PDF/print Blade templates:
// Static array
->extraViewData(['companyName' => 'Acme Corp'])
// Dynamic closure
->extraViewData(fn ($action) => [
'recordCount' => $action->getRecords()->count(),
])
#Header Action Specific Options
// Apply active table filters to export
->withFilters()
// Apply active search to export
->withSearch()
// Apply active sort to export
->withSort()
// Modify the query before export
->modifyQueryUsing(fn ($query) => $query->where('active', true))
// Multiple query modifications (they stack)
->modifyQueryUsing(fn ($query) => $query->where('active', true))
->modifyQueryUsing(fn ($query) => $query->where('role', 'admin'))
#Config File
All options can be set globally via the config file:
// config/filament-action-export.php
return [
'pdf_driver' => env('FILAMENT_EXPORT_PDF_DRIVER', 'dompdf'),
'default_format' => env('FILAMENT_EXPORT_DEFAULT_FORMAT', 'xlsx'),
'formats' => ['csv', 'xlsx', 'pdf'],
'csv_delimiter' => ',',
'chunk_size' => 1000,
'time_format' => 'Y-m-d_H-i',
'pdf_options' => [
'paper' => 'a4',
'orientation' => 'portrait',
],
'preview_enabled' => true,
'print_enabled' => true,
'use_snappy' => false,
'disable_additional_columns'=> false,
'disable_filter_columns' => false,
'disable_file_name' => false,
'disable_file_name_prefix' => false,
'disable_preview' => false,
'icons' => [
'action' => 'heroicon-o-arrow-down-tray',
'preview' => 'heroicon-o-eye',
'export' => 'heroicon-o-arrow-down-tray',
'print' => 'heroicon-o-printer',
'cancel' => 'heroicon-o-x-circle',
],
];
#Customizing Views
After publishing the views, you can customize them:
resources/views/vendor/filament-action-export/pdf.blade.php- PDF templateresources/views/vendor/filament-action-export/print.blade.php- Print templateresources/views/vendor/filament-action-export/components/table-view.blade.php- Preview table
#Translations
The package includes translations for: English, Brazilian Portuguese, Spanish, French, German, Italian, Dutch, Arabic, and Turkish.
After publishing, add your own translations in lang/vendor/filament-action-export/.
#Testing
composer test
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Contributing
Please see CONTRIBUTING for details.
#Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). Please see License File for more information.
The author
I'm a Full Stack PHP Developer from Assis, SP, Brazil with over 18 years of hands-on experience building robust platforms, managing server infrastructures, and crafting scalable solutions for businesses of all sizes.
My passion lives in the open source world — I actively maintain 20+ Filament plugins and a growing collection of Laravel packages used by thousands of developers worldwide. I believe great software should be accessible to everyone.
From the same author
EvolutionKit v5
A robust starter kit built on Laravel 13.x and Filament 5.x, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.
Author:
Jefferson Gonçalves
MFAKit v5
MFAKit is a robust starter kit built on Laravel 13.x and Filament 5.x, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.
Author:
Jefferson Gonçalves
Refresh Sidebar
Automatically refresh the sidebar navigation when certain events occur, ensuring menu items and badges are always up to date.
Author:
Jefferson Gonçalves
FilaKit v5
FilaKit is a robust starter kit, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.
Author:
Jefferson Gonçalves
Featured Plugins
A selection of plugins curated by the Filament team
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
Spotlight Pro
Browse your Filament Panel with ease. Filament Spotlight Pro adds a Spotlight/Raycast like Command Palette to your Filament Panel.
Dennis Koch
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle