Export of Data using Laravel Excel with groupings

67 Views Asked by At

I am trying to explore laravel excel. So far the examples that I see online are reports that are straight forward. : Like select a data in the export files and pass it to the view and call the export in the controller. (or something similar to it). I was able to export successfully. Assigning headers, icons and all. Then I wanted a variation on some reports. As shown in the screenshot below :

enter image description here

I want my records to be somehow grouped. I found resources on how to use query with group by but writing it in excel is kind of difficult.

Any ideas on how to do this magic?

If I try exporting the report would look like :

enter image description here

I really need help. This is part of my project at school.

Thank you.

0

There are 0 best solutions below