Skip to content

Commit d595ca0

Browse files
author
Admin
committed
Add list un hydrated feature avoid L 10 builder:paginate bug
1 parent 9acd993 commit d595ca0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Eloquent/CustomRelations/Builders/CleverEloquentBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ public function paginateUnHydrated(
6767
int|null|\Closure $total = null,
6868
): LengthAwarePaginator {
6969
$this->getUnHydrated = true;
70-
$result = $this->paginate($perPage, $columns, $pageName, $page, $total);
70+
$result = $total !== null ?
71+
$this->paginate($perPage, $columns, $pageName, $page, $total) :
72+
$this->paginate($perPage, $columns, $pageName, $page);
7173
$this->getUnHydrated = false;
7274

7375
return $result;

0 commit comments

Comments
 (0)