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);
                }
            }
        }
    }