Hero background

Specialized Actions

Beyond simple button clicks and modal confirmations, Filament provides powerful prebuilt actions that handle complex business operations with sophisticated user interfaces and robust functionality. These specialized actions transform common administrative tasks like data import/export, record management, and navigation into seamless, production-ready experiences that maintain data integrity while providing excellent user feedback and error handling.

# Export Actions

Export Actions

Transform your table data into downloadable files with intelligent column mapping, batch processing, and comprehensive format support. The export system handles large datasets efficiently using Laravel job queues and provides real-time progress tracking through database notifications.

Run these commands first:

php artisan make:queue-batches-table
php artisan make:notifications-table

php artisan vendor:publish --tag=filament-actions-migrations
php artisan migrate

And then creating Exporter:

 php artisan make:filament-exporter

Your Exporter class ->getColumns() could look like this:

public static function getColumns(): array
{
    return [
        ExportColumn::make('order_number'),
        ExportColumn::make('customer.name')
            ->label('Customer Name'),
        ExportColumn::make('status'),
        ExportColumn::make('total_amount'),
        ExportColumn::make('payment_status'),
        ExportColumn::make('created_at'),
    ];
}

Then the only thing you need is to add your ExportAction to your app:

use Filament\Tables\Actions\ExportAction;

ExportAction::make()
    ->exporter(OrderExporter::class)

# Import Actions

Import Actions

Enable bulk data uploads with intelligent validation, column mapping, and error recovery. The import system provides users with an intuitive interface to map CSV columns to database fields while handling validation failures gracefully through downloadable error reports.

Similarly like with exports: run these commands first:

php artisan make:queue-batches-table
php artisan make:notifications-table

php artisan vendor:publish --tag=filament-actions-migrations
php artisan migrate

And then creating Importer:

php artisan make:filament-importer

Your Importer class ->getColumns() could look like this:

public static function getColumns(): array
{
    return [
        ImportColumn::make('customer_id')
            ->rules(['required', 'exists:customers,id']),
        ImportColumn::make('status')
            ->rules(['required', 'in:pending,processing,shipped,delivered,cancelled']),
        ImportColumn::make('total_amount')
            ->numeric()
            ->rules(['required', 'numeric', 'min:0']),
        ImportColumn::make('payment_status')
            ->rules(['required', 'in:pending,paid,failed']),
    ];
}

Then the only thing you need is to add your ImportAction to your app:

use Filament\Tables\Actions\ImportAction;

ImportAction::make()
    ->importer(OrderImporter::class)

# Create Actions

Create Actions

Provide streamlined record creation with sophisticated form handling, validation, and post-creation workflows. Create actions support multi-step wizards, conditional fields, and custom success handling. All mentioned is defined in the models Form schema.

use Filament\Actions\CreateAction;

CreateAction::make(),

# Edit Actions

Edit Actions

Enable in-place record modification with comprehensive form validation, change tracking, and conflict resolution. Edit actions maintain data integrity while providing flexible update workflows.

use Filament\Tables\Actions\EditAction;

EditAction::make(),

# View Actions

View Actions

Present detailed record information in elegant, read-only interfaces that showcase relationships, computed data, and formatted content without overwhelming the user.

use Filament\Tables\Actions\ViewAction;

ViewAction::make(),

# Delete Actions

Delete Actions

Provide secure record removal with intelligent confirmation dialogs, cascade handling, and comprehensive audit trails to prevent accidental data loss.

use Filament\Tables\Actions\DeleteAction;

DeleteAction::make()
    ->requiresConfirmation()

# Replicate Actions

Replicate Actions

Enable intelligent record duplication with customizable field exclusions, relationship handling, and post-replication processing for efficient content creation workflows.

ReplicateAction::make()
    ->excludeAttributes(['order_number', 'tracking_number', 'created_at'])
    ->beforeReplicaSaved(function ($replica) {
        $replica->status = 'pending';
        $replica->payment_status = 'pending';
        $replica->order_number = 'ORD-' . str_pad(Order::count() + 1, 6, '0', STR_PAD_LEFT);
    })

# URL Actions

URL Actions

Create seamless navigation experiences that intelligently route users to internal resources, external links, or conditional destinations based on user permissions and data state.

// Navigate to customer
Action::make('view_customer')
    ->url(fn ($record) => CustomerResource::getUrl('view', ['record' => $record->customer]))
    ->icon('heroicon-o-user'),

// Print invoice
Action::make('print_invoice')
    ->url(fn ($record) => route('orders.invoice', $record))
    ->openUrlInNewTab()
    ->visible(fn ($record) => $record->payment_status === 'paid'),

// An external URL
Action::make('search')
    ->url(fn ($record) => 'https://www.google.com/search?q=' . $record->product->sku)
    ->openUrlInNewTab()