public function mutateManyToOrigin($attributes)
    {
        $mutations = [];

        foreach ($this->getMutations() as $label => $info)
        {
            $mutationModel = $this->getMutationModel($label);
            $model = $mutationModel->newFromBuilder($attributes[$label]);
            $model->setConnection($mutationModel->getConnectionName());
            $mutations[$label] = $model;
        }

        return $mutations;
    }
public function mutateManyToOrigin($attributes)
    {
        $mutations = [];

        foreach ($this->getMutations() as $label => $info)
        {
            $mutationModel = $this->getMutationModel($label);
            $model = $mutationModel->newFromBuilder($attributes[$label]);
            $model->setConnection($mutationModel->getConnectionName());
            $mutations[$label] = $model;
        }

        return $mutations;
    }
public function mutateManyToOrigin ( $ attributes ) { $ mutations = [ ] ; foreach ( $ this -> getMutations ( ) as $ label => $ info ) { $ mutationModel = $ this -> getMutationModel ( $ label ) ; $ model = $ mutationModel -> newFromBuilder ( $ attributes [ $ label ] ) ; $ model -> setConnection ( $ mutationModel -> getConnectionName ( ) ) ; $ mutations [ $ label ] = $ model ; } return $ mutations ; }
In the case of Many mutations we need to return an associative array having both
relations as a single record so that when we match them back we know which result
belongs to which parent node.

@param  array $attributes
@return void
In the case of Many mutations we need to return an associative array having both relations as a single record so that when we match them back we know which result belongs to which parent node .