public function sortByUrl()
    {
        $params = $_GET;
        $isDesc = isset($params['sort_order']) && $params['sort_order'] != 'asc';
        if ($this->isCurrentSortField() && $isDesc) {
            $params['sort_order'] = 'asc';
        } else {
            $params['sort_order'] = 'desc';
        }
        $params['order_by'] = $this->field;

        return url()->current().'?'.http_build_query($params);
    }
public function sortByUrl()
    {
        $params = $_GET;
        $isDesc = isset($params['sort_order']) && $params['sort_order'] != 'asc';
        if ($this->isCurrentSortField() && $isDesc) {
            $params['sort_order'] = 'asc';
        } else {
            $params['sort_order'] = 'desc';
        }
        $params['order_by'] = $this->field;

        return url()->current().'?'.http_build_query($params);
    }
public function sortByUrl ( ) { $ params = $ _GET ; $ isDesc = isset ( $ params [ 'sort_order' ] ) && $ params [ 'sort_order' ] != 'asc' ; if ( $ this -> isCurrentSortField ( ) && $ isDesc ) { $ params [ 'sort_order' ] = 'asc' ; } else { $ params [ 'sort_order' ] = 'desc' ; } $ params [ 'order_by' ] = $ this -> field ; return url ( ) -> current ( ) . '?' . http_build_query ( $ params ) ; }
Build the URL to sort data type by this field.

@return string Built URL
Build the URL to sort data type by this field .