original_string: protected function prepareValue($key, $record)
      {
          $field = $this->fields->first(function (Field $field) use ($key) {
              return in_array($key, (array) $field->column(), true);
          });
  
          if (method_exists($field, 'prepare')) {
              return $field->prepare($record);
          }
  
          return $record;
      }
code: protected function prepareValue($key, $record)
      {
          $field = $this->fields->first(function (Field $field) use ($key) {
              return in_array($key, (array) $field->column(), true);
          });
  
          if (method_exists($field, 'prepare')) {
              return $field->prepare($record);
          }
  
          return $record;
      }
code_tokens: protected function prepareValue ( $ key , $ record ) { $ field = $ this -> fields -> first ( function ( Field $ field ) use ( $ key ) { return in_array ( $ key , ( array ) $ field -> column ( ) , true ) ; } ) ; if ( method_exists ( $ field , 'prepare' ) ) { return $ field -> prepare ( $ record ) ; } return $ record ; }
docstring: Do prepare work for each field.
  
  @param string $key
  @param string $record
  
  @return mixed
docstring_tokens: Do prepare work for each field .