$collections = Collection::selectRaw("DATE(created_at) as collection_date, sum(gross_amount) as amount") ->groupBy(\'collection_date\') ->pag