src/Execution/DataLoader/ModelRelationFetcher.php
protected function associateRelationModels(string $relationName, EloquentCollection $relationModels): self
    {
        $relation = $this->getRelationInstance($relationName);

        $relation->match(
            $this->models->all(),
            $relationModels,
            $relationName
        );

        return $this;
    }
protected function associateRelationModels(string $relationName, EloquentCollection $relationModels): self
    {
        $relation = $this->getRelationInstance($relationName);

        $relation->match(
            $this->models->all(),
            $relationModels,
            $relationName
        );

        return $this;
    }
protected function associateRelationModels ( string $ relationName , EloquentCollection $ relationModels ) : self { $ relation = $ this -> getRelationInstance ( $ relationName ) ; $ relation -> match ( $ this -> models -> all ( ) , $ relationModels , $ relationName ) ; return $ this ; }
Associate the collection of all fetched relationModels back with their parents.

@param  string  $relationName
@param  \Illuminate\Database\Eloquent\Collection  $relationModels
@return $this
Associate the collection of all fetched relationModels back with their parents .