© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
5 replies
Keika

How to dispatch an event from an Action

Hi,
I have a View Action, very simple, on click I want it to trigger an event that should be queued...

so far I have:
Actions\Action::make('Fetch Details')
  ->color('info')
  ->action(function (Customer $customer): void {
      FetchDetails::dispatch($customer);
  })
Actions\Action::make('Fetch Details')
  ->color('info')
  ->action(function (Customer $customer): void {
      FetchDetails::dispatch($customer);
  })

However it runs the event synchronously. Horizon never receives it (and it fails!)
The event has
implement ShouldQueue
implement ShouldQueue
.

Can I send this event to the queue from within an action?
Solution
I dont think its an issue with Filament, Action can call any function, can you confirm your env file QUEUE_CONNECTION and can you confirm your queue is working please
Jump to solution
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 dispatch an event from a Notification Action
FilamentFFilament / ❓┊help
3y ago
Unable to dispatch/listen event from Action
FilamentFFilament / ❓┊help
3y ago
dispatch livewire event after action execution
FilamentFFilament / ❓┊help
2y ago
Dispatch event not working on action
FilamentFFilament / ❓┊help
3y ago