original_string: protected function onceWithColumns($columns, $callback)
      {
          $original = $this->columns;
  
          if (is_null($original)) {
              $this->columns = $columns;
          }
  
          $result = $callback();
  
          $this->columns = $original;
  
          return $result;
      }
code: protected function onceWithColumns($columns, $callback)
      {
          $original = $this->columns;
  
          if (is_null($original)) {
              $this->columns = $columns;
          }
  
          $result = $callback();
  
          $this->columns = $original;
  
          return $result;
      }
code_tokens: protected function onceWithColumns ( $ columns , $ callback ) { $ original = $ this -> columns ; if ( is_null ( $ original ) ) { $ this -> columns = $ columns ; } $ result = $ callback ( ) ; $ this -> columns = $ original ; return $ result ; }
docstring: Execute the given callback while selecting the given columns.
  
  After running the callback, the columns are reset to the original value.
  
  @param  array  $columns
  @param  callable  $callback
  @return mixed
docstring_tokens: Execute the given callback while selecting the given columns .