src/Traits/Translatable.php
public function attributesToArray()
    {
        $attributes = parent::attributesToArray();

        foreach ($this->translatableAttributes as $translatableAttribute) {
            if (isset($attributes[$translatableAttribute])) {
                $attributes[$translatableAttribute] = $this->translate($translatableAttribute);
            }
            unset($attributes["{$translatableAttribute}_translation"]);
        }

        return $attributes;
    }
public function attributesToArray()
    {
        $attributes = parent::attributesToArray();

        foreach ($this->translatableAttributes as $translatableAttribute) {
            if (isset($attributes[$translatableAttribute])) {
                $attributes[$translatableAttribute] = $this->translate($translatableAttribute);
            }
            unset($attributes["{$translatableAttribute}_translation"]);
        }

        return $attributes;
    }
public function attributesToArray ( ) { $ attributes = parent :: attributesToArray ( ) ; foreach ( $ this -> translatableAttributes as $ translatableAttribute ) { if ( isset ( $ attributes [ $ translatableAttribute ] ) ) { $ attributes [ $ translatableAttribute ] = $ this -> translate ( $ translatableAttribute ) ; } unset ( $ attributes [ "{$translatableAttribute}_translation" ] ) ; } return $ attributes ; }
Extend parent's attributesToArray so that _translation attributes do not appear in array, and translatable attributes are translated.

@return array
Extend parent s attributesToArray so that _translation attributes do not appear in array and translatable attributes are translated .