Filament Counting Relationship only Count For specific Interval date
I have Users Table and Visits Table, each user can submit a visit and mark the timestamp. I created a new column named "visit count", its working well to show visit count with no specific interval (All time from first visit). However in my case, I have to apply filters for specific interval date. its like to find most visited customer for specific date. How do ->count() method can reflect based on the date filter in filament?
2 Replies
yeah this one, but how do I get the current filter state ? I have been trying to Inject HasTable Object but the function inside ->counts() only accept one parameter 'query'. fn (Builder $query)