src/Execution/DataLoader/ModelRelationFetcher.php
protected function setModels($models): self
    {
        // We can not use the collect() helper here, since we require this
        // to be an Eloquent Collection
        $this->models = $models instanceof EloquentCollection
            ? $models
            : new EloquentCollection($models);

        return $this;
    }
protected function setModels($models): self
    {
        // We can not use the collect() helper here, since we require this
        // to be an Eloquent Collection
        $this->models = $models instanceof EloquentCollection
            ? $models
            : new EloquentCollection($models);

        return $this;
    }
protected function setModels ( $ models ) : self { // We can not use the collect() helper here, since we require this // to be an Eloquent Collection $ this -> models = $ models instanceof EloquentCollection ? $ models : new EloquentCollection ( $ models ) ; return $ this ; }
Set one or more Model instances as an EloquentCollection.

@param  mixed  $models
@return $this
Set one or more Model instances as an EloquentCollection .