Skip to content

Commit

Permalink
fix model hiden field
Browse files Browse the repository at this point in the history
  • Loading branch information
sakuraovq committed Sep 13, 2020
1 parent 5e314e5 commit 5559a7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/db/src/Eloquent/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,13 @@ public function hydrate(array $items): Collection
$instance = $this->newModelInstance();

return $instance->newCollection(array_map(function ($item) use ($instance) {
return $instance->newFromBuilder($item);
$model = $instance->newFromBuilder($item);

// overwirte
$model->setModelHidden($this->model->getModelHidden());
$model->setModelVisible($this->model->getModelVisible());

return $model;
}, $items));
}

Expand Down

0 comments on commit 5559a7c

Please sign in to comment.