$pagination->pageUrl()
Returns the URL of the current page. If the $page variable is set, the URL for that page will be returned.
$pagination->pageUrl(int|null $page = null): string|nullParameters
| Name | Type | Default | 
|---|---|---|
| $page | intornull | null | 
Return types
stringornull
This method modifies the existing $pagination object it is applied to and returns it again.
Parent class
<?php
$subpages   = $page->children()->paginate(10);
$pagination = $subpages->pagination();
?>
…
<a href="<?= $pagination->pageUrl(5) ?>">
  Go to page 5
</a>