diff --git a/src/Paginator.php b/src/Paginator.php index 09d9fca..962ea5d 100644 --- a/src/Paginator.php +++ b/src/Paginator.php @@ -84,6 +84,38 @@ public function toJson(int $options = 0): string return json_encode($this->jsonSerialize(), $options); } + /** + * Get the items being paginated. + */ + public function items(): Collection + { + return $this->items; + } + + /** + * get current page. + */ + public function currentPage(): int + { + return $this->currentPage; + } + + /** + * get per page size. + */ + public function perPage(): int + { + return $this->perPage; + } + + /** + * get total items. + */ + public function total(): int + { + return $this->totalItems; + } + /** * Set the items for the paginator. * @param mixed $items