Closed imbue closed 1 year ago
It looks like a workaround could be to use the ExportBulkAction
in combination with the Select all X
functionality. This will also export records that are not visible in the current page.
I think this was implemented when you use ->fromTable()
Yeah this option also works for me. Thanks @pxlrbt
A little bit off-issue-topic but is there a way to export related data on a row-for-every-relation basis? I.e some orders have 1 order line, some have 2 or more.
Order | Product | Quantity |
---|---|---|
ORD001 | product_a | 1 |
ORD001 | product_b | 3 |
ORD002 | product_c | 1 |
I've considered a couple of options but each of them has a blocker:
Column::make('ordersLines[0].product')
syntax, but this lacks flexibility due to being limited to that indexAny ideas?
Not really. Haven't found a good way to implement relation across multiple columns yet.
Solution:
ExportAction::make()
->exports([
ExcelExport::make()
->fromModel()
->useTableQuery(),
]),
This uses the model attributes and the currently active table query.
Is it currently possible to apply the active table filters when exporting using the ExportAction as header action?
Currently this ExportAction will export all records of that db table. It would be great if the filters could be applied to the export query so the user can create an export for i.e. a specific date range: