Is there any way to grab the filtered values and export them to PDF or XLS? #29
Comments
This would be awesome. I do see a possible issue when exporting large amount of data. I expect, it may require a second controller, via an api style call (ie not rendered by Inertia) to pass all the data (axios etc). Would be nice to pass the current filters and column status props so you can match what is being displayed. Cheers. |
I made a controller for this, using FastExcel for export. Instructions are commented in the gist, but in a few words:
Obs.: Relation columns should be with dot notation, and you need to create the Sort class in app/Sorts/{MainModel}/{RelationModel} with Sort suffix, ie: app/Sorts/Product/OwnerSort.php (to support sorting) Example:
And it should work with no modifications.. In most cases :') |
PDF/XLS exports are out of scope for this package, but I suggest looking at Laravel Excel. Maybe you could use the Collection Export feature. |
I am needing to export the records that are filtered in the table in XLS or PDF Format using Laravel and VueJS.
The text was updated successfully, but these errors were encountered: