diff --git a/src/Transformers/NoneTransformer.php b/src/Transformers/NoneTransformer.php new file mode 100644 index 0000000..98482d3 --- /dev/null +++ b/src/Transformers/NoneTransformer.php @@ -0,0 +1,35 @@ +toArray(); + } + + return Arr::wrap($data); + } + + /** + * @param array|Arrayable $data + * @return array + */ + public function transformOutput($data): array + { + if ($data instanceof Arrayable) { + return $data->toArray(); + } + + return Arr::wrap($data); + } +}