Skip to content

Commit

Permalink
use transform instead of toArray
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Jul 29, 2022
1 parent 2b81fc4 commit 17d1ddf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Concerns/TransformableData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17d1ddf

Please sign in to comment.