original_string: public function only($attributes)
      {
          $results = [];
  
          foreach (is_array($attributes) ? $attributes : func_get_args() as $attribute) {
              $results[$attribute] = $this->getAttribute($attribute);
          }
  
          return $results;
      }
code: public function only($attributes)
      {
          $results = [];
  
          foreach (is_array($attributes) ? $attributes : func_get_args() as $attribute) {
              $results[$attribute] = $this->getAttribute($attribute);
          }
  
          return $results;
      }
code_tokens: public function only ( $ attributes ) { $ results = [ ] ; foreach ( is_array ( $ attributes ) ? $ attributes : func_get_args ( ) as $ attribute ) { $ results [ $ attribute ] = $ this -> getAttribute ( $ attribute ) ; } return $ results ; }
docstring: Get a subset of the model's attributes.
  
  @param  array|mixed  $attributes
  @return array
docstring_tokens: Get a subset of the model s attributes .