public function getAttribute($key)
    {
        if (in_array($key, $this->getTranslatable())) {
            return $this->translate() ? $this->translate()->$key : null;
        }

        return parent::getAttribute($key);
    }
public function getAttribute($key)
    {
        if (in_array($key, $this->getTranslatable())) {
            return $this->translate() ? $this->translate()->$key : null;
        }

        return parent::getAttribute($key);
    }
public function getAttribute ( $ key ) { if ( in_array ( $ key , $ this -> getTranslatable ( ) ) ) { return $ this -> translate ( ) ? $ this -> translate ( ) -> $ key : null ; } return parent :: getAttribute ( $ key ) ; }
Get an attribute from the model or translation.

@param string $key

@return mixed
Get an attribute from the model or translation .