© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
2 replies
Sayy

how to custom actions on editing record

how custom actions if the actions on editing record, because after click custom action not update, and i want to generate pdf after that

Action::make('customAction')
                ->label('SIMPAN & CETAK')
                ->button()
                ->color('primary')
                ->action(function () {
                    $data = $this->form->getState();

                    $this->getSaveFormAction();

                    $dataOrder = Order::where('order_number', $data["order_number"])->with('customer', 'orderDetails')->get();
                    //dd($dataOrder);
                    $pdf = Pdf::loadView('pdf.print-order-create', [
                        'order' => $dataOrder,
                    ]);

                    return response()->streamDownload(function () use ($pdf) {
                        echo $pdf->stream();
                    }, 'Faktur Pembayaran - ' . $data["order_number"] . '.pdf');
                }),
Action::make('customAction')
                ->label('SIMPAN & CETAK')
                ->button()
                ->color('primary')
                ->action(function () {
                    $data = $this->form->getState();

                    $this->getSaveFormAction();

                    $dataOrder = Order::where('order_number', $data["order_number"])->with('customer', 'orderDetails')->get();
                    //dd($dataOrder);
                    $pdf = Pdf::loadView('pdf.print-order-create', [
                        'order' => $dataOrder,
                    ]);

                    return response()->streamDownload(function () use ($pdf) {
                        echo $pdf->stream();
                    }, 'Faktur Pembayaran - ' . $data["order_number"] . '.pdf');
                }),


already using getsaveformaction but not update
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 to custom actions on create record
FilamentFFilament / ❓┊help
2y ago
Custom record pass to recordActions of resource page
FilamentFFilament / ❓┊help
4mo ago
Fileupload in Single record editing with custom page
FilamentFFilament / ❓┊help
13mo ago
How to create a dynamic table actions based on record ?
FilamentFFilament / ❓┊help
3y ago