Skip to content

Commit

Permalink
Add onFirstPage/onLastPage
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 authored Oct 16, 2024
1 parent 625a5e8 commit 26deea5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Layout/Concerns/WithScroll.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ public function hasMorePages(): bool
return $this->getPageItems()->hasMorePages();
}

public function onFirstPage(): bool
{
return $this->getPageItems()->onFirstPage();
}

public function onLastPage(): bool
{
return $this->getPageItems()->onLastPage();
}

protected function getPageItems(?int $page = null): LengthAwarePaginator
{
$page ??= $this->getPage();
Expand Down

0 comments on commit 26deea5

Please sign in to comment.