protected function updateAttributesWithTranslated()
    {
        $translationInfo = $this->translationAnalyzer()->analyze($this->model());

        $attributes = $this->info['attributes'];

        // Mark the fillable fields on the translation model
        foreach ($translationInfo['attributes'] as $key => $attribute) {

            /** @var ModelAttributeData $attribute */
            if ( ! $attribute->translated) {
                continue;
            }

            if ( ! isset($attributes[$key])) {
                $attributes[$key] = $attribute;
            }

            /** @var ModelAttributeData $attributeData */
            $attributeData = $attributes[$key];
            $attributeData->merge($attribute);

            $attributes[$key] = $attributeData;
        }

        $this->info['attributes'] = $attributes;
    }
protected function updateAttributesWithTranslated()
    {
        $translationInfo = $this->translationAnalyzer()->analyze($this->model());

        $attributes = $this->info['attributes'];

        // Mark the fillable fields on the translation model
        foreach ($translationInfo['attributes'] as $key => $attribute) {

            /** @var ModelAttributeData $attribute */
            if ( ! $attribute->translated) {
                continue;
            }

            if ( ! isset($attributes[$key])) {
                $attributes[$key] = $attribute;
            }

            /** @var ModelAttributeData $attributeData */
            $attributeData = $attributes[$key];
            $attributeData->merge($attribute);

            $attributes[$key] = $attributeData;
        }

        $this->info['attributes'] = $attributes;
    }
protected function updateAttributesWithTranslated ( ) { $ translationInfo = $ this -> translationAnalyzer ( ) -> analyze ( $ this -> model ( ) ) ; $ attributes = $ this -> info [ 'attributes' ] ; // Mark the fillable fields on the translation model foreach ( $ translationInfo [ 'attributes' ] as $ key => $ attribute ) { /** @var ModelAttributeData $attribute */ if ( ! $ attribute -> translated ) { continue ; } if ( ! isset ( $ attributes [ $ key ] ) ) { $ attributes [ $ key ] = $ attribute ; } /** @var ModelAttributeData $attributeData */ $ attributeData = $ attributes [ $ key ] ; $ attributeData -> merge ( $ attribute ) ; $ attributes [ $ key ] = $ attributeData ; } $ this -> info [ 'attributes' ] = $ attributes ; }
Updates model information attributes with translated attribute data.
Updates model information attributes with translated attribute data .