$files->last()

Returns the last file in the collection

  • return ($file)

Example

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