src/Transformations/TransformationFactory.php
public function collectionWith($entity, $transformer, $key = null): TransformationFactory
	{
		$this->entity      = $entity;
		$this->transformer = $transformer;
		$this->resource    = new Collection($entity, $transformer, $key);

		return $this;
	}
public function collectionWith($entity, $transformer, $key = null): TransformationFactory
	{
		$this->entity      = $entity;
		$this->transformer = $transformer;
		$this->resource    = new Collection($entity, $transformer, $key);

		return $this;
	}
public function collectionWith ( $ entity , $ transformer , $ key = null ) : TransformationFactory { $ this -> entity = $ entity ; $ this -> transformer = $ transformer ; $ this -> resource = new Collection ( $ entity , $ transformer , $ key ) ; return $ this ; }
Uses a Collection resource on the data and transformer passed in.

@param mixed                        $entity
@param TransformerAbstract|callable $transformer
@param null|mixed                   $key

@return \Fuzz\Data\Transformations\TransformationFactory
Uses a Collection resource on the data and transformer passed in .