Filter to exclude files that contain specific string in their name

I’d rather create my own filter here:

$page->images()->filter(function($image) {
  return !str::contains($image->filename(), 'cover');
});
6 Likes