fix: mostly working paginator

This commit is contained in:
2025-05-13 16:11:30 -05:00
parent e230913c89
commit 6c0e42d291
3 changed files with 46 additions and 12 deletions

View File

@@ -20,6 +20,8 @@ class Paginator
private $items;
public $currentPage = 1;
/**
* @param QueryBuilder|Query $query
* @param int $page
@@ -38,6 +40,7 @@ class Paginator
$this->total = $paginator->count();
$this->lastPage = (int) ceil($paginator->count() / $paginator->getQuery()->getMaxResults());
$this->items = $paginator;
$this->currentPage = $page;
return $this;
}