FilamentF
Filament2y ago
Abi

Open a URL in a new tab after Custom Action in a Panel

I have the following action defined on a Resource's View Page and I want to store the data and open a URL in a new tab. What is the cleanest way to do this inside a Filament Panel

Actions\Action::make('Create Campaign')
    ->form([
        TextInput::make('name')
            ->label('Campaign Name'),
        Select::make('Audience')
            ->options([
                'customers' => 'Event Customers',
                'others' => 'Everybody except Event Customers'
            ])
    ])
    ->action(function ($data) {
        // Store the data and open a URL in a new tab
    })
Was this page helpful?