$pagination->isLastPage()

Checks if the current page is the last page

  • return (boolean)

Example

$subpages   = $page->children()->paginate(10);
$pagination = $subpages->pagination();

if($pagination->isLastPage()) {
  echo 'This is the last page';
}