Filament Table Filtering: Summarizing Data by Year in Separate Rows
I want to apply a filter to my Filament table. My goal is to create a separate row for each year as a result of the filtering, and summarize the data for that year in each row.
For example, I want to obtain a result like this after filtering:
For filtering, I'm using the following code:
php
However, this code doesn't give me the desired result. All records are returned as a result of the filtering, and a separate row is not created for each year.
My questions are:
What changes do I need to make in the filtering code?
What steps should I follow to create a separate row for each year and summarize the data for that year?
How can I display the data obtained from the query result in the Filament table?
Thank you in advance for your help.
Best regards.
0 Replies