© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
Hemanath

How use ->action() and ->url

I trying use the form and send the form data through the ->url(), if i use ->url() without opening the form it is redirecting to the url.

Action::make('Print Label')
->action(function ($record, array $data) {
//
})
->url(
fn (Despatch $record, array $data): string => route('web.despatchprintlable', ['record' => $record, 'space' => Arr::get($data, 'space_no')]),
shouldOpenInNewTab: true
)
->icon('heroicon-s-download')
->visible(function ($record) {
$transactions = Transaction::find($record->transaction_ids);
$flag = false;
foreach ($transactions as $k => $transaction) {
if ($transaction->sub_master_id == config('constants.transaction_types.cm_request')) {
$flag = true;
break;
}
}
return ($flag) ? true : false;
})
->form([
TextInput::make('space_no')->numeric()->minValue(0)->required(),
])
->modalWidth('xl')
->modalbutton('Print Lable'), this is the code.
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

Action Url
FilamentFFilament / ❓┊help
3y ago
Modal Action Hit Url
FilamentFFilament / ❓┊help
3y ago
How use Public Var inside Action
FilamentFFilament / ❓┊help
3y ago
Need action that open url and refresh table
FilamentFFilament / ❓┊help
11mo ago