src/Transformations/TransformationFactory.php
public function usingPaginator($paginator = null): TransformationFactory
	{
		if (! ($this->resource instanceof Collection) || ! ($this->entity instanceof LengthAwarePaginator)) {
			throw new \InvalidArgumentException('Bad Request Issued');
		}

		$this->resource->setPaginator(new IlluminatePaginatorAdapter($this->entity));

		return $this;
	}
public function usingPaginator($paginator = null): TransformationFactory
	{
		if (! ($this->resource instanceof Collection) || ! ($this->entity instanceof LengthAwarePaginator)) {
			throw new \InvalidArgumentException('Bad Request Issued');
		}

		$this->resource->setPaginator(new IlluminatePaginatorAdapter($this->entity));

		return $this;
	}
public function usingPaginator ( $ paginator = null ) : TransformationFactory { if ( ! ( $ this -> resource instanceof Collection ) || ! ( $ this -> entity instanceof LengthAwarePaginator ) ) { throw new \ InvalidArgumentException ( 'Bad Request Issued' ) ; } $ this -> resource -> setPaginator ( new IlluminatePaginatorAdapter ( $ this -> entity ) ) ; return $ this ; }
Applies a LengthAwarePaginator for paged resources.

@param null $paginator

@throws \InvalidArgumentException

@return \Fuzz\Data\Transformations\TransformationFactory
Applies a LengthAwarePaginator for paged resources .