public function setAttribute($key, $value)
    {
        if ($this->hasTranslatedAttributes() && in_array($key, $this->translatedAttributes)) {
            $this->getTranslationOrNew(\localizer\locale()->id())->$key = $value;
        } else {
            parent::setAttribute($key, $value);
        }
    }
public function setAttribute($key, $value)
    {
        if ($this->hasTranslatedAttributes() && in_array($key, $this->translatedAttributes)) {
            $this->getTranslationOrNew(\localizer\locale()->id())->$key = $value;
        } else {
            parent::setAttribute($key, $value);
        }
    }
public function setAttribute ( $ key , $ value ) { if ( $ this -> hasTranslatedAttributes ( ) && in_array ( $ key , $ this -> translatedAttributes ) ) { $ this -> getTranslationOrNew ( \ localizer \ locale ( ) -> id ( ) ) -> $ key = $ value ; } else { parent :: setAttribute ( $ key , $ value ) ; } }
Translatable attribute mutator

@param $key
@param $value
Translatable attribute mutator