$pagination->lastPageUrl()

Returns the absolute URL for the last page

  • return (string)

Example

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

<!-- foreach loop with subpages -->

<a href="<?= $pagination->lastPageUrl() ?>">
  Go to last page
</a>