public function transform($data = null, $transformer = null, string $resourceKey = null):SuccessResponseBuilder
    {
        $resource = $this->resourceFactory->make($data);

        if (! is_null($resource->getData())) {
            $model = $this->resolveModel($resource->getData());
            $transformer = $this->resolveTransformer($model, $transformer);
            $resourceKey = $this->resolveResourceKey($model, $resourceKey);
        }

        if ($transformer instanceof Transformer) {
            $this->include($relations = $this->resolveNestedRelations($resource->getData()));

            if ($transformer->allRelationsAllowed()) {
                $transformer->setRelations($relations);
            }
        }

        $this->resource = $resource->setTransformer($transformer)->setResourceKey($resourceKey);

        return $this;
    }