F
Filamentβ€’4mo ago
Jordy

Export summary rows

Currently have a report page with normal columns but also summaries.. I have to export the table pretty much as it is (including summaries) Is there a way to do this (AFAIK not with core).. what is the best approach to still use as much of core as possible?
Solution:
Laravel Excel
Supercharged Excel exports and imports in Laravel | Laravel Excel
Laravel Excel is intended at being Laravel-flavoured PhpSpreadsheet: a simple, but elegant wrapper with the goal of simplifying exports and imports.
Jump to solution
8 Replies
ModestasV
ModestasVβ€’4mo ago
Like in general, a custom column to be exported? ahh, nevermind, I misunderstood docs... that's a column, not a row lol. Umm, there has to be a way to append another custom row!
Jordy
Jordyβ€’4mo ago
I group per product and each product has its own summary I only need those per product summaries, the "all" summary doesnt have much value as I summarize a relationship pic to illustrate
No description
ModestasV
ModestasVβ€’4mo ago
Hmmm... I don't think that the filament exported allows that I was unable to previously group by rows too, so that also complicates stuff But to be fair, my approach would be a job that generates a file in my own rules (export) and then notification that handles the download. So using:
Action::make()->action(fn() => new ExportJob())
Action::make()->action(fn() => new ExportJob())
Jordy
Jordyβ€’4mo ago
what would you use to build said custom export? ive used laravel excel before and was hoping I could just do this https://docs.laravel-excel.com/3.1/exports/from-view.html#from-view
Solution
ModestasV
ModestasVβ€’4mo ago
Laravel Excel
Supercharged Excel exports and imports in Laravel | Laravel Excel
Laravel Excel is intended at being Laravel-flavoured PhpSpreadsheet: a simple, but elegant wrapper with the goal of simplifying exports and imports.
ModestasV
ModestasVβ€’4mo ago
It should work for your use-case, but might require a bit of tinkering πŸ™‚
Jordy
Jordyβ€’4mo ago
thats fine kek, cheers :)
Want results from more Discord servers?
Add your server