$files->pluck($field, $split = null, $unique = false)

Plucks all values for a specific field from the collection and returns those as array.

  • return (array)

Example

<ul>
  <?php foreach($page->files()->pluck('filename') as $filename): ?>
  <li><?= html($filename) ?></li>
  <?php endforeach ?>
</ul>

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