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}");
            }
        }
    }