$files->has($file)

Checks if a $file object is included in the collection

  • $file (File | string)
    Accepts a filename or a file object
  • return (boolean)
<?php if($page->files()->has('myimage.jpg')): ?>
There exists a file with the filename `myimage.jpg`
<?php endif ?>