What I am trying to do:
Trying to create a custom export action in v4. From a single button, I want a trigger that will call multiple separate exporters (and therefore multiple CSV files exported). Essentially a streamlined way to export an entire database.
What I did:
Tried to make an action, with two exporters as that action. Clicking the button doesn’t appear to trigger the exporter. I’ve also tried extending the default exporter classes but still couldn’t figure it out. I fear this is incredibly simple but I’m too far into the woods. I’m not very comfortable with actions and classes, any help or suggestions would be appreciated.
Code:
```php
Action::make('Export Projects')
->action(function () {
ExportAction::make('export_projects')
->columnMapping(false)
->exporter(ProjectExporter::class);
ExportAction::make('export_subcomponents')
->columnMapping(false)
->exporter(SubcomponentExporter::class);
});
```