Skip to content

Commit

Permalink
Merge pull request #38 from aerni/fix/data-hydration
Browse files Browse the repository at this point in the history
Fix Entry data hydration
  • Loading branch information
jonassiewertsen authored Sep 12, 2023
2 parents 7623fc5 + c7a141b commit 9e5a4ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Synthesizers/EntryCollectionSynthesizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public function hydrate($values)
$entry = Entry::make()
->id($value['id'])
->slug($value['slug'] ?? null)
->collection($value['collection'] ?? null);
->collection($value['collection'] ?? null)
->data($value['data']);

if ($value['date']) {
$entry->date($value['date'] ?? null);
Expand Down
3 changes: 2 additions & 1 deletion src/Synthesizers/EntrySynthesizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public function hydrate($value)
$entry = Entry::make()
->id($value['id'])
->slug($value['slug'] ?? null)
->collection($value['collection'] ?? null);
->collection($value['collection'] ?? null)
->data($value['data']);

if ($value['date']) {
$entry->date($value['date'] ?? null);
Expand Down

0 comments on commit 9e5a4ed

Please sign in to comment.