protected function makeResource()
    {
        /** @var Item|Collection $resource */
        $resource = new $this->resourceClass($this->data, $this->transformer, $this->resourceKey);

        if (!empty($this->meta)) {
            $resource->setMeta($this->meta);
        }

        if ($resource instanceof Collection && isset($this->paginator)) {
            $resource->setPaginator($this->paginator);
        }

        return $resource;
    }