Skip to content

Kirby 4.5.0

$pages->first()

Returns the first element

$pages->first(): mixed

Return type

mixed

Parent class

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

Example

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