Problem and Solutions
How to write this query in Laravel Eloquent ?
By M.K. Verma · 2 May 2022

You could try somthing like this
Visitor::select('country')
->withCount('id')
->groupBy('country')
->latest()
->get()Advertisement
Problem and Solutions
By M.K. Verma · 2 May 2022

You could try somthing like this
Visitor::select('country')
->withCount('id')
->groupBy('country')
->latest()
->get()