pxlrbt / filament-excel

Excel Export for Filament Admin Resources
MIT License
364 stars 68 forks source link

[Feature] Make it work with standalone filament/tables. #4

Closed pxlrbt closed 2 years ago

felixsc commented 2 years ago

Are there any special steps required to make it work with the standalone tables package? Or is it better to use Laravel Excel directly for now?

I'm not entirely sure how the admin panel & standalone version differs, but it seems it's not working out of the box as I get a Method App\Http\Livewire\MyTable::getResource does not exist.

Thanks for creating this package!

pxlrbt commented 2 years ago

Are there any special steps required to make it work with the standalone tables package? Or is it better to use Laravel Excel directly for now?

Currently resolving the fields assumes the structure of the admin panel. I guess this is the only part that needs a change: https://github.com/pxlrbt/filament-excel/blob/main/src/Concerns/ResolvesFieldsFromResource.php#L48

pxlrbt commented 2 years ago

Ah, and of course getting the resouce must be refactored: https://github.com/pxlrbt/filament-excel/blob/main/src/Actions/ExportAction.php#L54