src/Blueprint.php
protected function groupBy($columnname_or_columnarray) {
        if (!is_array($columnname_or_columnarray)) {
            $columnname_or_columnarray = [$columnname_or_columnarray];
        }
        $this->query->setGroupBy($columnname_or_columnarray);
        return $this;
    }
protected function groupBy($columnname_or_columnarray) {
        if (!is_array($columnname_or_columnarray)) {
            $columnname_or_columnarray = [$columnname_or_columnarray];
        }
        $this->query->setGroupBy($columnname_or_columnarray);
        return $this;
    }
protected function groupBy ( $ columnname_or_columnarray ) { if ( ! is_array ( $ columnname_or_columnarray ) ) { $ columnname_or_columnarray = [ $ columnname_or_columnarray ] ; } $ this -> query -> setGroupBy ( $ columnname_or_columnarray ) ; return $ this ; }
Sets the groupby clause

@param $groupby - has three possible types:
string $columnname
array($columnone, $columntwo, ...)
array($tableone => array($columnone, $columntwo,  ...), $tabletwo => array(...), ...)
@return $this
Sets the groupby clause