$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>

Is something missing or incorrect? Edit this page on Github…