src/Services/Saver.php
protected function collectRelations($field, $name)
    {
        if ($field instanceof HasOne && $field->hasRelation()) {
            $relation = $field->getRelation();
            $this->relations[$relation][$name] = $this->input($name);
        }

        if ($field->hasRelation()) {
            $relation = $field->getRelation();

            // register relation
            if (!array_has($this->relations, $relation)) {
                $this->relations[$relation] = [];
            }

            if (!$field->getTranslatable()) {
                $this->relations[$relation][$name] = $this->input("{$relation}.{$name}");
            }
        }
    }
protected function collectRelations($field, $name)
    {
        if ($field instanceof HasOne && $field->hasRelation()) {
            $relation = $field->getRelation();
            $this->relations[$relation][$name] = $this->input($name);
        }

        if ($field->hasRelation()) {
            $relation = $field->getRelation();

            // register relation
            if (!array_has($this->relations, $relation)) {
                $this->relations[$relation] = [];
            }

            if (!$field->getTranslatable()) {
                $this->relations[$relation][$name] = $this->input("{$relation}.{$name}");
            }
        }
    }
protected function collectRelations ( $ field , $ name ) { if ( $ field instanceof HasOne && $ field -> hasRelation ( ) ) { $ relation = $ field -> getRelation ( ) ; $ this -> relations [ $ relation ] [ $ name ] = $ this -> input ( $ name ) ; } if ( $ field -> hasRelation ( ) ) { $ relation = $ field -> getRelation ( ) ; // register relation if ( ! array_has ( $ this -> relations , $ relation ) ) { $ this -> relations [ $ relation ] = [ ] ; } if ( ! $ field -> getTranslatable ( ) ) { $ this -> relations [ $ relation ] [ $ name ] = $ this -> input ( "{$relation}.{$name}" ) ; } } }
Collect relations for saving.

@param $field
@param $name
Collect relations for saving .