Replies: 3 comments 1 reply
-
|
AFIK there is no I have had a similar need and got it mostly working. In my scenario the client wanted to have an admin order export from the order table view. But since there could be multiple order items in each order the client wanted the export file to have a new row for each order item / product. So pretty similar to your scenario. I have managed to make it happen except for one problem that the columns are now not in the right order right now, not sure why this is causing this issue. I have added ExportAction::make()
->label('Export Orders')
->icon('heroicon-o-arrow-down-tray')
->modifyQueryUsing(function ($query) {
return OrderItem::query()
->whereIn('order_id', $query->get('id')->pluck('id'));
})
->exporter(AdminOrderExporter::class),And inside my // protected static ?string $model = Order::class;
protected static ?string $model = OrderItem::class;It would be really cool if you can make your own iterators inside |
Beta Was this translation helpful? Give feedback.
-
|
Hi @bomshteyn does this still work ? Couldn't get your solution to work (v3.3) |
Beta Was this translation helpful? Give feedback.
-
|
Hey @aizensoosuke I appreciate your input here. I revisited this today and found a solution, although a little messy works within the pre-existing UX (no filters required). First of all I extended Show / Hide OrderItemExportBulkActionEnsuring to use it within my resource: Show / Hide ResourceThen within my OrderItemExporter I've added the Show / Hide OrderItemExporter |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Package
Actions
Package Version
v3.2.23
How can we help you?
I have a built a list/datatable for cakes, and i want to add bulk action to allow user to export cake list, as well as cakes steps.
for cakes list, it is no issue and very straight forward. But when i want to export cakes steps, which is related records of cakes, i not sure how can i do?
I tried to use the records() method to let the filament ExportBulkAction to get cake steps as records instead of cakes, it just not working and ignored (overwrite) whatever i to set. (as explained below)
So what is the best way i can do? Do i really need to extends the ExportBulkAction class to archive my purpose?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions