$files->first()

Returns the first file in the collection

  • return ($file)

Example

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