Skip to content

Commit

Permalink
Update Model.php
Browse files Browse the repository at this point in the history
Removed othe toArray call as well (so when fetching multiple relations they are kept as models not arrays).
  • Loading branch information
Restartz authored Jul 8, 2019
1 parent 88aaccb commit 1e101d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function setRelations(array $attributes)
if (is_array($value)) {
return collect($value)->map(function($value) use ($key) {
return $this->mapToModel($key, $value);
})->toArray();
});
}
return $this->mapToModel($key, $value);
});
Expand Down

0 comments on commit 1e101d2

Please sign in to comment.