I'm trying to loop over and query two values, and get the count. Laravel only returns one result in the array. I feel like its doing the whereBetween once, and no further. Does this look right?
$queryTotals = $users->query();
foreach($times as $k => $v)
{
$time_group[$k]['count'] = $queryTotals->whereBetween('join_date', array($v[0], $v[1]))
->get()
->count();
}
It's comparing between two values (two timestamps), and counting the total of members between that range.