Skip to content

Commit 9c34dbd

Browse files
committed
修正数据集的toView方法
1 parent b7ff337 commit 9c34dbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/model/Collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Collection extends BaseCollection
2929
{
3030
public function toView(string $view)
3131
{
32-
$this->each(function (Model $model) use($view) {
33-
$model->toView($view);
32+
return $this->map(function (Model $model) use($view) {
33+
return $model->toview($view);
3434
});
3535
}
3636

0 commit comments

Comments
 (0)