$files->first()

Returns the first file in the collection

  • return ($file)

Example

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