Update code

This commit is contained in:
James Cole
2024-02-14 19:47:35 +01:00
parent ac17b82d85
commit 7897ebc4d5
6 changed files with 49 additions and 48 deletions

View File

@@ -477,7 +477,7 @@ class GroupCollector implements GroupCollectorInterface
}
// OR filter the array according to the start and end row variable
if (null !== $this->startRow && null !== $this->endRow) {
return $collection->slice((int)$this->startRow, (int)$this->endRow);
return $collection->slice($this->startRow, $this->endRow);
}
return $collection;
@@ -493,7 +493,7 @@ class GroupCollector implements GroupCollectorInterface
$this->setLimit(50);
}
if(null !== $this->startRow && null !== $this->endRow) {
$total = (int)($this->endRow - $this->startRow);
$total = $this->endRow - $this->startRow;
return new LengthAwarePaginator($set, $this->total, $total, 1);
}