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

  • 491
  • Created Oct 2020
  • Updated Nov 2025

Files in this example

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

aschmelyun/laravel-job-board

  • 175
  • 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