Tests if model has columns

@param string|string[] $columns List of columns to test

@throws UnknownColumnException
14817
final public static function checkUnknownColumn($columns)
    {
        $unknown = array_diff((array) $columns, self::getColumns());
        if (!empty($unknown)) {
            throw new UnknownColumnException(static::class, $unknown);
        }
    }
1838
protected function shouldSelect(array $columns = ['*'])
    {
        if ($columns === ['*']) {
            $columns = [$this->related->getTable() . '.*'];
        }

        return array_merge($columns, $this->aliasedPivotColumns());
    }
691414
private function hasColumnConfiguration($column)
    {
        $columns = $this->options[self::GRID_PARAM_COLUMNS];

        foreach ($columns as $configuration) {
            // By default a column is considered as visible
            if (!isset($configuration[self::GRID_PARAM_HIDDEN])) {
                $configuration[self::GRID_PARAM_HIDDEN] = false;
            }

            // Find linearly (must exists and must not be hidden)
            if ($column == $configuration[self::GRID_PARAM_COLUMN] && $configuration[self::GRID_PARAM_HIDDEN] != true) {
                return true;
            }
        }

        // Not found by default
        return false;
    }
455856
public function columns($columns)
    {
        if (is_string($columns)) {
            $columns = preg_split('~\s*,\s*~', trim($columns));
        }

        $this->columns = $columns;

        return $this;
    }
1013542
public function addSelectColumns(array $columns)
    {
        foreach ($columns as $column) {
            is_array($column)
                ? count($column) != count($column, true)
                ? $this->addSelectColumns(...$column) : $this->addSelectColumn(...$column) : $this->addSelectColumn($column);
        }
        
        return $this;
    }
451957
function setColumns($columns) {
		$this->columns = array();

		if ($columns === null) {
			return $this;
		}

		if (is_string($columns)) {
			return $this->addColumn($columns);
		}

		foreach ($columns as $alias => &$column) {
			$this->addColumn($column, is_int($alias) ? null : $alias);
		}
		return $this;
	}
414791
protected function select($columns=[])
    {
        $query = $this->model->newQuery()->getQuery();
        if ($columns) {
            $query->select($columns);
        }
        return $query;
    }
996321
public function from($table, $columns = null)
    {
        $this->table($table);
        if( !empty($columns) ) {
            $this->columns($columns);
        }
        return $this;
    }
179068
public function set(array $columns)
    {
        parent::set($columns);
        $compiler = $this->connection->getCompiler();
        return $this->connection->count($compiler->update($this->sql), $compiler->getParams());
    }
36823
public function select($columns = [])
    {
        $expr = new ColumnExpression($this->getSQLStatement());

        if ($columns instanceof Closure) {
            $columns($expr);
        } else {
            if (!is_array($columns)) {
                $columns = [$columns];
            }
            $expr->columns($columns);
        }
    }
1200334
public function setColumns(array $columns)
    {
        $this->mappingColumns = null;
        $this->columns = array_values($columns);

        return $this;
    }
884302
public function columns($columns = '*')
    {
        if (false === is_array($columns) && $columns != '*') {
            $columns = func_get_args();
        }
        foreach ($columns as $column) {
            $this->sql['columns'][$column] = 1;
        }
        return $this;
    }
202583
protected function validateColumns( &$columns )
	{
		if( is_string( $columns ) && $columns )
			$columns	= array( $columns );
		else if( is_array( $columns ) && !count( $columns ) )
			$columns	= array( '*' );
		else if( $columns === NULL || $columns == FALSE )
			$columns	= array( '*' );

		if( !is_array( $columns ) )
			throw new \InvalidArgumentException( 'Column keys must be an array of column names, a column name string or "*"' );
		foreach( $columns as $column )
			if( $column != '*' && !in_array( $column, $this->columns ) )
				throw new \InvalidArgumentException( 'Column key "'.$column.'" is not a valid column of table "'.$this->tableName.'"' );
	}
984297
public function firstOrFail($columns = ['*'])
    {
        if (! is_null($model = $this->first($columns))) {
            return $model;
        }
        throw new RuntimeException("No query results for model [".get_class($this->model)."]");
    }
233520
public function notIn(array $columns)
    {
        $results = [];
        foreach ($this->columns as $name => $column) {
            if (!in_array($name, $columns, true)) {
                $results[] = $name;
            }
        }

        return new Result($results, $this->columns);
    }
1111303
public function setColumns( $columns ){
		if( !( is_array( $columns ) && count( $columns ) ) )
			throw new \InvalidArgumentException( 'Column array must not be empty' );
		$this->columns = $columns;
	}
769049
public function setColumns(array $columns): self
    {
        foreach ($columns as $column => list($type, $size)) {
            list($type, $size) = $this->validateColumn($type, $size);
            $columns[$column] = [$type, $size];
        }
        $this->columns = $columns;
        return $this;
    }