$pagination->lastPage()

Returns the last page number

  • return (integer)

Example

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

echo $pagination->lastPage();