original_string: public function setAttribute($key, $value)
      {
          if (in_array($key, $this->getTranslatable())) {
              $translation = $this->translateOrNew($this->getLocale());
  
              $translation->$key = $value;
  
              $this->translationCache[$this->getLocale()] = $translation;
  
              return $translation;
          }
  
          return parent::setAttribute($key, $value);
      }
code: public function setAttribute($key, $value)
      {
          if (in_array($key, $this->getTranslatable())) {
              $translation = $this->translateOrNew($this->getLocale());
  
              $translation->$key = $value;
  
              $this->translationCache[$this->getLocale()] = $translation;
  
              return $translation;
          }
  
          return parent::setAttribute($key, $value);
      }
code_tokens: public function setAttribute ( $ key , $ value ) { if ( in_array ( $ key , $ this -> getTranslatable ( ) ) ) { $ translation = $ this -> translateOrNew ( $ this -> getLocale ( ) ) ; $ translation -> $ key = $ value ; $ this -> translationCache [ $ this -> getLocale ( ) ] = $ translation ; return $ translation ; } return parent :: setAttribute ( $ key , $ value ) ; }
docstring: Set a given attribute on the model or translation.
  
  @param string $key
  @param mixed $value
  
  @return $this
docstring_tokens: Set a given attribute on the model or translation .