Skip to content

Commit

Permalink
fix: json formatting of arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Mar 22, 2021
1 parent cfae558 commit a522979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Drivers/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function save(Model $model, string $directory): bool
file_put_contents($path, '');
}

$data = array_filter($model->getAttributes());
$data = array_filter($model->attributesToArray());

$json = json_encode($data, JSON_PRETTY_PRINT);

Expand Down

0 comments on commit a522979

Please sign in to comment.