public function getOrderBy()
    {
        $orderColumn = $this->getOrderColumn();

        if (is_array($orderColumn)) {
            // An order by raw statement
            return $orderColumn[0];
        }

        $selectedColumnNames = $this->getSelectColumns();

        if (! in_array($orderColumn, $selectedColumnNames)) {
            throw IncorrectOrderColumn::name($orderColumn);
        }

        $order = request('order');

        return [$orderColumn, $order[0]['dir']];
    }
public function getOrderBy()
    {
        $orderColumn = $this->getOrderColumn();

        if (is_array($orderColumn)) {
            // An order by raw statement
            return $orderColumn[0];
        }

        $selectedColumnNames = $this->getSelectColumns();

        if (! in_array($orderColumn, $selectedColumnNames)) {
            throw IncorrectOrderColumn::name($orderColumn);
        }

        $order = request('order');

        return [$orderColumn, $order[0]['dir']];
    }
public function getOrderBy ( ) { $ orderColumn = $ this -> getOrderColumn ( ) ; if ( is_array ( $ orderColumn ) ) { // An order by raw statement return $ orderColumn [ 0 ] ; } $ selectedColumnNames = $ this -> getSelectColumns ( ) ; if ( ! in_array ( $ orderColumn , $ selectedColumnNames ) ) { throw IncorrectOrderColumn :: name ( $ orderColumn ) ; } $ order = request ( 'order' ) ; return [ $ orderColumn , $ order [ 0 ] [ 'dir' ] ] ; }
Returns the values for order by clause of the query.

@throws IncorrectOrderColumn

@return array
Returns the values for order by clause of the query .