'How to count the repetition of a single value in a group in laravel 8 and get the value if it exceeds a certain limit?
I want to pick the dates from the 'reservation_date' column if the same column repeats itself X number of times(I'd be using a variable to compare). Something like
$arrayOfDates => Reservations::groupBy('reservation_date')->
Now I can't find anywhere on how to select based on the count of the repetition of a value. Something like
where(count(as count of the items in a group >= $X)->get()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
