$files->limit($limit)

Returns the collection with a limited set of items

  • return ($files)

Example

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