From 17d1ddfc5170e85f69bf92498e4b7fc09cf30792 Mon Sep 17 00:00:00 2001 From: Ruben Van Assche Date: Fri, 29 Jul 2022 11:31:19 +0200 Subject: [PATCH] use transform instead of toArray --- src/Concerns/TransformableData.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Concerns/TransformableData.php b/src/Concerns/TransformableData.php index 52762442..112097c3 100644 --- a/src/Concerns/TransformableData.php +++ b/src/Concerns/TransformableData.php @@ -18,12 +18,12 @@ public function toArray(): array public function toJson($options = 0): string { - return json_encode($this->toArray(), $options); + return json_encode($this->transform(), $options); } public function jsonSerialize(): array { - return $this->toArray(); + return $this->transform(); } public static function castUsing(array $arguments)