© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
MZX

Modify create button to do more than create

Am I doing this right?

I want to create the record, but also go to the checkout page.

protected function getCreateFormAction(): Action
    {
        return Action::make('pay')
            ->label('Pay')
            ->submit('create')
            ->action(function ($record) {
                $amount = $record->amount;
                return redirect()->route('create.checkout.session', ['amount' => $amount]);
            })
            ->color('success');
    }
protected function getCreateFormAction(): Action
    {
        return Action::make('pay')
            ->label('Pay')
            ->submit('create')
            ->action(function ($record) {
                $amount = $record->amount;
                return redirect()->route('create.checkout.session', ['amount' => $amount]);
            })
            ->color('success');
    }
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How modify create button label
FilamentFFilament / ❓┊help
3y ago
how to create a table composed of more than one model
FilamentFFilament / ❓┊help
11mo ago
How to remove create & create another button?
FilamentFFilament / ❓┊help
3y ago
hiding create & createAnother
FilamentFFilament / ❓┊help
3y ago