Recursively build up the order query.

@param  string  $column
@param  string  $key
@return void
554514
protected function resolveOrder($column, $key)
    {
        $this->resolve($column, $key, $this->getTableName(), function ($query, $pattern) {
            $this->builder->orderBy($query, $pattern);
        });
    }
389744
public function lists($column, $key = null)
    {
        $this->applyCriteria();
        $this->applyScope();

        $lists = $this->model->lists($column, $key);

        $this->resetModel();

        return $lists;
    }
452560
public function orderBy($column, $direction = 'ASC')
    {
        $orderVal         = [
            'ASC'  => 1,
            'DESC' => -1,
        ];
        $this->ordering[] = [
            'column'    => $column,
            'direction' => $orderVal[strtoupper($direction)],
        ];

        return $this;
    }
570012
public function pluck($column, $key = null)
    {
        // First, we will need to select the results of the query accounting for the
        // given columns / key. Once we have the results, we will be able to take
        // the results and get the exact data that was requested for the query.
        $queryResult = $this->onceWithColumns(
            is_null($key) ? [$column] : [$column, $key],
            function () {
                return $this->processor->processSelect(
                    $this, $this->runSelect()
                );
            }
        );

        if (empty($queryResult)) {
            return collect();
        }

        // If the columns are qualified with a table or have an alias, we cannot use
        // those directly in the "pluck" operations since the results from the DB
        // are only keyed by the column itself. We'll strip the table out here.
        $column = $this->stripTableForPluck($column);

        $key = $this->stripTableForPluck($key);

        return is_array($queryResult[0])
                    ? $this->pluckFromArrayColumn($queryResult, $column, $key)
                    : $this->pluckFromObjectColumn($queryResult, $column, $key);
    }
705028
public function pluck($column, $key = null)
    {
        $results = $this->toBase()->pluck($column, $key);

        // If the model has a mutator for the requested column, we will spin through
        // the results and mutate the values so that the mutated version of these
        // columns are returned as you would expect from these Eloquent models.
        if (! $this->model->hasGetMutator($column) &&
            ! $this->model->hasCast($column) &&
            ! in_array($column, $this->model->getDates())) {
            return $results;
        }

        $keys = array_keys($results);
        $results = array_map(
            function ($value) use ($column) {
                return $this->model->newFromBuilder([$column => $value])->$column;
            },
            $results,
            $keys
        );
        return $results;
    }
138350
public function lists($column, $key = null)
	{
		$columns = $this->getListSelect($column, $key);

		$results = new Collection($this->get($columns));

		return $results->lists($columns[0], array_get($columns, 1));
	}
457592
public function orderBy($column, $order = 'asc')
    {
        $this->order[0] = $column;
        $this->order[1] = strtolower($order) == 'desc' ? 'desc' : 'asc';
        return $this;
    }
290699
protected function order()
    {
        $column = $this->getParamAdapter()->getColumn();
        $order = $this->getParamAdapter()->getOrder();
        if ($column) {
            $this->select->reset('order');
            $this->select->order($column . ' ' . $order);
        }
    }
244970
public function plunk($column, $key = null, $limit = null, $useMaster = false)
    {
        $this->sql['columns'] == '' && $this->columns(is_null($key) ? $column : [$key, $column]);
        $result = $this->select(0, $limit, $useMaster);
        $return = [];
        foreach ($result as $row) {
            is_null($key) ? $return[] = $row[$column] : $return[$row[$key]] = $row[$column];
        }
        return $return;
    }
1164830
public function setDefaultOrder($column, $order = self::ORDER_ASC): void
    {
        $this->defaultOrder = [$column => $order];
    }
427877
public function addColumnStatus($key, $name, $column = null)
	{
		$this->addColumnCheck($key);
		$column = $column ?: $key;

		return $this->addColumn($key, new Column\ColumnStatus($this, $key, $column, $name));
	}
128572
public function sortBy($column, $order = 'asc')
    {
        $this->prepare();

        if (!is_array($this->_map)) {
            return $this;
        }

        usort($this->_map, function ($a, $b) use ($column, $order) {
            $val1 = $this->getFromNested($a, $column);
            $val2 = $this->getFromNested($b, $column);
            if (is_string($val1)) {
                $val1 = strtolower($val1);
            }

            if (is_string($val2)) {
                $val2 = strtolower($val2);
            }

            if ($val1 == $val2) {
                return 0;
            }
            $order = strtolower(trim($order));

            if ($order == 'desc') {
                return ($val1 > $val2) ? -1 : 1;
            } else {
                return ($val1 < $val2) ? -1 : 1;
            }
        });

        return $this;
    }
25252
public function orderByField($column, array $params = [])
    {
        if (count($params) <= 0) return $this;

        $this->order->addByField($column, $params);
        return $this;
    }
874412
public function pluck($column, $key = null)
    {
        $this->applyCriteria();

        return $this->model->pluck($column, $key);
    }
1138342
public function addColumnNumber($key, $name, $column = null)
	{
		$this->addColumnCheck($key);
		$column = $column ?: $key;

		return $this->addColumn($key, new Column\ColumnNumber($this, $key, $column, $name));
	}
17904
public function pluck($column, $key = null)
    {
        $result = $this->getBuilder()->pluck($column, $key);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
667404
function orderBy($column, $dir = null) {
		if (null !== $dir && '' !== $dir) {
			$dir = strtoupper($dir);
			if ($dir !== self::ASC && $dir !== self::DESC) {
				throw new RuntimeException("$dir is not a valid sorting direction.");
			}
			$column .= ' ' . $dir;
		}
		$this->orders[] = trim($column);
		return $this;
	}