We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18e4521 + 355a837 commit cb418e0Copy full SHA for cb418e0
src/Concerns/DataTransformer.php
@@ -13,9 +13,9 @@ public function toArray(): array
13
return $this->buildDataForExport();
14
}
15
16
- public function toJson(): string
+ public function toJson($options = 0): string
17
{
18
- return json_encode($this->buildDataForExport());
+ return json_encode($this->buildDataForExport(), $options);
19
20
21
public function toPrettyJson(): string
src/Contracts/BaseDTO.php
@@ -26,7 +26,7 @@ public static function fromCommand(Command $command): static;
26
27
public function toArray(): array;
28
29
- public function toJson(): string;
+ public function toJson($options = 0): string;
30
31
public function toPrettyJson(): string;
32
0 commit comments