public function table(Table $table): Table {
return $table
->query(/**/)
->columns([/**/])
->recordAction('myAction')
->recordUrl(null)
->actions([
Action::make('myAction')
->action(fn(Model $record) =>
/* Here I've tried a couple things */
$this->dispatch(new SomeEvent($record->id)))
/* or */
event(new SomeEvent($record->id))
])
->striped();
public function table(Table $table): Table {
return $table
->query(/**/)
->columns([/**/])
->recordAction('myAction')
->recordUrl(null)
->actions([
Action::make('myAction')
->action(fn(Model $record) =>
/* Here I've tried a couple things */
$this->dispatch(new SomeEvent($record->id)))
/* or */
event(new SomeEvent($record->id))
])
->striped();