$this->collection->map(function (BrandStat $brandStat) { return [ 'date' => $brandStat->created_at->isoFormat('YYYY-MM-DD'), 'active' => $brandStat->active, 'inactive' => $brandStat->inactive, 'old_accounts' => $brandStat->old_accounts, 'new_accounts' => $brandStat->new_accounts, 'total_accounts' => $brandStat->total_accounts, 'total_opt_in' => $brandStat->total_opt_in ]; }) ]; } }