How to call arbitrary backend code from an Action

Apologies if this has been covered before – I did search and read through the docs but couldn't find a similar use-case (which is surprising, so I suspect I'm using the wrong search terms).

I want to create a header action (easy peasy!), which, when clicked on, executes some arbitrary backend code. In my case it's in app/Actions/GitHub/SyncReleaseCandidates.php, which has a handle() method. I happen to be using the https://laravelactions.com/ package but I'm not sure that matters here.

I suspect this is just a paradigm/how Filament works kind of question and there's a "right way" to do this. Thanks for any pointers/tips!
Solution
I think you're looking for
action
method

->action(function(){
  SyncReleaseCandidates::make();

// send notification
})
Was this page helpful?