From d83d8fe2bbe44d9f7e41de27168fa567506de0b6 Mon Sep 17 00:00:00 2001 From: specialtactics Date: Tue, 26 Mar 2019 20:56:30 +1100 Subject: [PATCH] No idea how this (!) got here ! --- src/Transformers/RestfulTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Transformers/RestfulTransformer.php b/src/Transformers/RestfulTransformer.php index b8883e2..d60dd3f 100644 --- a/src/Transformers/RestfulTransformer.php +++ b/src/Transformers/RestfulTransformer.php @@ -123,7 +123,7 @@ protected function transformKeysCase(array $transformed) /* * However, if the level is 1, we also want to transform the first level of keys in a json field which has been cast to array */ - if (! $levels == 1) { + if ($levels == 1) { foreach ($this->model->getCasts() as $fieldName => $castType) { if ($castType == 'array') { $fieldNameFormatted = $this->formatKeyCase($fieldName);