From 10b2380e9edb83bfe91ed74ac3ff2ec18ceb323f Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Wed, 14 Dec 2022 19:15:19 -0700 Subject: [PATCH] Make sure to actually update other references as well --- app/Extensions/Spatie/Fractalistic/Fractal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Extensions/Spatie/Fractalistic/Fractal.php b/app/Extensions/Spatie/Fractalistic/Fractal.php index 7fcd91b46..7af9b5436 100644 --- a/app/Extensions/Spatie/Fractalistic/Fractal.php +++ b/app/Extensions/Spatie/Fractalistic/Fractal.php @@ -34,7 +34,7 @@ class Fractal extends SpatieFractal // itself and set it automatically. $class = is_string($this->transformer) ? new $this->transformer() : $this->transformer; if (is_null($this->resourceName) && $class instanceof Transformer) { - $this->resourceName = $this->transformer->getResourceName(); + $this->resourceName = $class->getResourceName(); } return parent::createData();