Returns the absolute URL for the last page
<?php
$subpages = $page->children()->paginate(10);
$pagination = $subpages->pagination();
?>
<!-- foreach loop with subpages -->
<a href="<?php echo $pagination->lastPageUrl() ?>">
Go to last page
</a>