$pages->nth($n)

Returns the nth page in the collection

  • $n (int)
    The number of the item to be returned
  • return ($page)

Example

// echo the title of the 4th subpage
// (the index starts at 0)
echo $page->children()->nth(3)->title();