$site->videos()

Returns a $files collection with all video files placed directly in /content

  • return ($files)

Example

<h2>Videos</h2>
<?php foreach($site->videos() as $video): ?>
<video width="300" height="200" controls>
  <source src="<?php echo $video->url() ?>" type="<?php echo $video->mime() ?>">
</video>
<?php endforeach ?>