protected function compileOrdersToArray(Builder $query, $orders)
    {
        return array_map(function ($order) {
            return $order['sql'] ?? $this->wrap($order['column']).' '.$order['direction'];
        }, $orders);
    }
protected function compileOrdersToArray(Builder $query, $orders)
    {
        return array_map(function ($order) {
            return $order['sql'] ?? $this->wrap($order['column']).' '.$order['direction'];
        }, $orders);
    }
protected function compileOrdersToArray ( Builder $ query , $ orders ) { return array_map ( function ( $ order ) { return $ order [ 'sql' ] ?? $ this -> wrap ( $ order [ 'column' ] ) . ' ' . $ order [ 'direction' ] ; } , $ orders ) ; }
Compile the query orders to an array.

@param  \Illuminate\Database\Query\Builder  $query
@param  array  $orders
@return array
Compile the query orders to an array .