get query from ListRecords\Tab within Badge() to show the actual count() of filtered query
I'm talking about this: https://filamentphp.com/docs/3.x/panels/resources/listing-records#adding-badges-to-filter-tabs
in the example above, this could be quite useful for showing the number of records that pass that filter.
I'm using the method
modifyQueryUsing()
to filter the records for every Tab, but how can I access the query to apply the count() eloquent method to display number of records within the Badge()
method without manually writing the query again?2 Replies