getTransformer('item'), $this->resourceKeyItem); } /** * Transformer * * @return \League\Fractal\TransformerAbstract */ public abstract function getTransformer($type = 'list'); protected function transformCollection($data) { return new Collection($data, $this->getTransformer('list'), $this->resourceKeyCollection); } protected function transformPaginator($paginator) { $collection = $paginator->getCollection(); $resource = new Collection($collection, $this->getTransformer('list'), $this->resourceKeyCollection); $resource->setPaginator(new IlluminatePaginatorAdapter($paginator)); return $resource; } }