Get the first match.

@param  array   $columns

@return array
178702
public function first($columns = array('*'))
    {
        $columns = is_array($columns) ? $columns : func_get_args();

        $results = $this->scrape($columns);

        return current($results);
    }
1299953
protected function getValidColumns($columns)
    {
        $valid = array();
        foreach ($columns as $column) {
            if (!isset($this->data[$column])) {
                continue;
            }
            
            $valid[$column] = $this->data[$column];
        }
        
        return $valid;
    }
36852
public function firstOrFail($columns = ['*'])
    {
        if (! is_null($model = $this->first($columns))) {
            return $model;
        }

        throw (new ModelNotFoundException)->setModel(get_class($this->related));
    }
1197780
public function select($columns = [])
    {
        $columns = is_array($columns) ? $columns : func_get_args();

        if (! empty($columns)) {
            $this->columns = $columns;
        }

        return $this;
    }
1089764
protected function getSelectColumns(array $columns = array('*'))
	{
		if ($columns == array('*'))
		{
			$columns = array($this->related->getTable().'.*');
		}

		return array_merge($columns, array($this->parent->getTable().'.'.$this->firstKey));
	}
414791
protected function select($columns=[])
    {
        $query = $this->model->newQuery()->getQuery();
        if ($columns) {
            $query->select($columns);
        }
        return $query;
    }
505489
public function first($columns = array('*'))
    {
        $results = $this->take(1)->get($columns)->current();

        return (isset($results[0]) && count($results[0]) > 0) ? $results[0]->getProperties() : null;
    }
906775
public function firstOrFail($columns = [])
    {
        $record = $this->first($columns);

        if (! $record) {
            throw (new ModelNotFoundException())
                ->setQuery($this->getUnescapedQuery(), $this->getDn());
        }

        return $record;
    }
893846
public function all($columns = ['*'])
    {
        if (!empty($this->defaultOrderColumn)) {
            return $this->model->orderBy($this->defaultOrderColumn, $this->defaultOrderDirection)->get($columns);
        }
        return $this->model->get($columns);
    }
626854
public function columns(array $columns)
    {
        foreach ($columns as $column => $value) {
            $this->column($column, $value);
        }

        return $this;
    }
587987
public function firstOrFail($columns = ['*'])
    {
        $result = $this->query()->first($columns);

        if ( ! empty($result)) return $result;

        throw (new ModelNotFoundException)->setModel($this->model());
    }
1030744
public function drop($columns)
    {
        if (!is_array($columns)) {
            $columns = [$columns];
        }

        $this->compileWheres();
        $result = $this->query->replace(function ($doc) use ($columns) {
            return $doc->without($columns);
        })->run();

        return 0 == (int) $result['errors'];
    }
821232
public function checkExistsColumns($columns = [])
    {
        $this->connection();

        return $this->getSchema()->hasColumns($this->table, $columns);
    }
1126451
protected function getColumnHeaders($columns)
    {
        $headers = [];

        foreach ($columns as $column => $label) {
            $headers[] = Lang::get($label);
        }

        return $headers;
    }
115790
public function firstOrFail($columns = ['*'])
    {
        $this->parse();

        return $this->getHandler()->firstOrFail($this->getColumns($columns));
    }
158035
public function get($columns = ['*'])
    {
        if ($this->query->from instanceof Subquery) {
            $this->wheresToSubquery($this->query->from);
        }

        return parent::get($columns);
    }
681620
protected function getValidColumns($columns)
    {
        $valid = [];
        $dataColumns = array_keys($this->data);
        
        foreach ($columns as $column) {
            if (!in_array($column, $dataColumns)) {
                continue;
            }

            $valid[$column] = $this->data[$column];
        }

        return $valid;
    }