Answer the question
In order to leave comments, you need to log in
What is the best way to output quantity in filters in Laravel?
Hello!
For example, such a filter
. What is the best way to display the quantity in this filter?
$countFirst = $data->where('entity', '>=', $n)->count(); and then pass $countFirst to the template for each checkbox or selectRaw
What is the best way to do it, won't these requests slow down the page a lot?
Answer the question
In order to leave comments, you need to log in
This is called facet search and is implemented differently. For this phrase, you will find many instructions, including ready-made packages for Laravel - choose what you like.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question