How can I filter out only results when total is greater than n? other words only IPs with more wisits than n (say 500)
I tried ->where('total','>',500) but it didn't work
Thank you
$visits = DB::table('visits')
    ->select('ip_address',DB::raw('count(*) as total'))
    ->where('timestamp', '>=',\Carbon\Carbon::now()->startOfDay())
    ->groupBy('ip_address')
    ->orderBy('total', 'desc')
    ->get();
 
    