$files->shuffle()

Returns the collection in shuffled order.

  • return ($files)

Example

<ul>
  <?php foreach($page->files()->shuffle() as $file): ?>
  <li>
    <a href="<?= $file->url() ?>">
      <?= html($file->filename()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>