$files->last()

Returns the last file in the collection

  • return ($file)

Example

<?php echo $page->files()->last()->filename() ?>