Skip to content

Kirby 4.4.1

$pages->last()

Returns the last element

$pages->last(): mixed

Return type

mixed

Parent class

Kirby\Cms\Pages inherited from Kirby\Toolkit\Collection

Example

<?= $page->children()->last()->title() ?>