Skip to content

Kirby 4.5.0

$files->last()

Returns the last element

$files->last(): mixed

Return type

mixed

Parent class

Kirby\Cms\Files inherited from Kirby\Toolkit\Collection

Example

<?= $page->files()->last()->filename() ?>