public function groupBy($groupBy) { if (is_array($groupBy)) { $this->groupBy = implode(', ', $groupBy); } else { $this->groupBy = $groupBy; } return $this; }