Skip to main content

Code Examples of filter

Discover how to use Laravel's filter method in real-world applications. Browse 4 examples from popular open-source projects.

4 examples
The filter method filters the collection using the given callback, keeping only those items that pass a given truth test.
Read more in the official Laravel docs.

spatie/dashboard.spatie.be

  • 1947
  • Created Jun 2017
  • Updated Jan 2024

Files in this example

  • app/Services/GitHub/GitHubApi.php
View full example

spatie/spatie.be

  • 495
  • Created Oct 2020
  • Updated Dec 2025

Files in this example

  • app/Services/GitHub/GitHubApi.php
View full example

aschmelyun/laravel-job-board

  • 173
  • Created Mar 2021
  • Updated Apr 2025

Files in this example

  • app/Http/Controllers/ListingController.php
View full example

Astrotomic/opendor.me

  • 79
  • Created May 2021
  • Updated Aug 2024

Files in this example

  • app/Http/Controllers/Web/ProfileController.php
View full example

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.