Group

@param string $columns
@return BaseRepository
@throws RepositoryException
541188
public function group($columns) {
		if ($this->selection)
			$this->selection->group($columns);
		else
			throw new RepositoryException("Before using the function group(...) call read(...).");
		return $this;
	}
742852
public function order($columns)
    {
        foreach ($columns as $column => $position) {
            $this->positions[$column] = $position;
        }

        return $this;
    }
694026
public function group($columns)
    {
        if (null === $this->group) {
            $this->group = $this->element('GROUP BY', $columns);
        } else {
            $this->group->append($columns);
        }

        return $this;
    }
543553
public function get($columns = array('*'))
    {
        $models = $this->getModels($columns);

        if (count($models) > 0) {
            $models = $this->eagerLoadRelations($models);
        }

        return $this->model->newCollection($models);
    }
394678
public function findByMethod($method, array $columns = ['*'])
    {
        $this->applyCriteria();

        $result = $this->model->{$method}($columns);

        if ( ! $result )
            throw new RepositoryException("Method {{$method}} does not exist on the model.");

        return $result;
    }
1154020
public function groupBy(string $column)
    {
        return $this->bindNewInstance(Arr::group($this->dump(), $column, true));
    }
402540
public function alongWith(array $columns)
	{
		foreach($columns as $key => $value)
		{
			if(strpos($value, '.') === false)
			{
				$columns[$key] = $this->getJunctionTable() . '.' . $value;
			}
		}

		$this->alongWith = $columns;

		return $this;
	}
71244
public function columns(array $columns)
    {
        $columns = array_unique($columns);

        foreach ($columns as &$column) {
            $column = $this->dialect()->quoteTable($column);
        }
        unset($column);

        $this->columns = $columns;

        return $this;
    }
933073
function columns(array $columns)
    {
        foreach ($columns as &$col) {
            if (!$col instanceof Attribute) {
                $col = new UnqualifiedColumn($col);
            }
        }
        $this->nodes->columns = $columns;
        return $this;
    }
765515
public function whereMultiple(array $columns)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->whereMultiple($columns);

        return $instance;
    }
1211877
public function groupBy(array $columns) {
		// for each given parameter
		foreach($columns as $column) {
			// secure the column name
			list($column) = Query\Convert::columnToPlaceholder($this->Quote ,$column);
			// push it
			$this->Groups[] = $column;
		}
		// return self to the next method
		return $this;
	}
619095
public function groupBy($column)
    {
        if (is_null($column)) {
            throw new \InvalidArgumentException('Cannot pass null argument to '.__METHOD__);
        }

        if (is_array($column)) {
            $this->groupBy = $this->extractArrayAttributes($column);

            return $this;
        }

        $this->groupBy = $this->quoteIdentifier($column);

        return $this;
    }
1099454
public function multiSortBy(array $columns)
    {
        foreach ($columns as $column => $direction) {
            if (strpos($column, '.')) {
                $this->sortByRelation($column, $direction);
            } else {
                $this->sortBy($column, $direction);
            }
        }

        return $this;
    }
945439
public function get($columns = ['*'])
    {
        if ( ! is_null($this->cacheSeconds)) {
            return $this->getCached($columns);
        }

        return parent::get($columns);
    }
697117
public function select($columns) {
		if ($this->selection) {
			if ($this->containSelectPrimaryKey($columns) === false) {
				$columns .= "," . $this->getPrimaryKey();
			}
			$this->selection->select($columns);
		} else
			throw new RepositoryException("Before using the function select(...) call read(...).");
		return $this;
	}
705695
public function columns(array $columns): self
    {
        foreach ($columns as $name => $alias) {
            if (!is_string($name)) {
                $this->column($alias, null);
                continue;
            }
            if (is_string($alias)) {
                $this->column($name, $alias);
            } else {
                $this->column($alias, $name);
            }
        }
        return $this;
    }
1346882
public function groupBy(string $column)
    {
        $instance = $this->groupByStrategyInstance();

        $instance->groupByStrategy()->groupBy($column);

        return $instance;
    }