public static function addGroup($group, $table, &$query)
    {
        if(!empty($group)) {
            $groups = explode(',', $group);
            foreach($groups as $group) {
                if (!strpos($group, '.')) {
                    $query->groupBy($table . '.' . $group);
                } else {
                    $query->groupBy($group);
                }
            }
        }
    }
public static function addGroup($group, $table, &$query)
    {
        if(!empty($group)) {
            $groups = explode(',', $group);
            foreach($groups as $group) {
                if (!strpos($group, '.')) {
                    $query->groupBy($table . '.' . $group);
                } else {
                    $query->groupBy($group);
                }
            }
        }
    }
public static function addGroup ( $ group , $ table , & $ query ) { if ( ! empty ( $ group ) ) { $ groups = explode ( ',' , $ group ) ; foreach ( $ groups as $ group ) { if ( ! strpos ( $ group , '.' ) ) { $ query -> groupBy ( $ table . '.' . $ group ) ; } else { $ query -> groupBy ( $ group ) ; } } } }
Add a group by functionality to the query builder
Add a group by functionality to the query builder