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)