original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Build the URL to sort data type by this field.
  
  @return string Built URL
docstring_tokens: Build the URL to sort data type by this field .