Dynamic Filters With Laravel Eloquent

Amirhosein Zlf
FAUN — Developer Community 🐾
7 min readFeb 23, 2021

--

Did you ever had a Laravel application and needs filters over your API? You might have tried GraphQL, however, you could write a simple one and don’t need any integrations.

In this article I’m going to implement a simple service which could work with Laravel eloquent ORM, it would handle relations and also the basic operators which uses the most.

The Idea

--

--

Tech enthusiast with a love for Football, Formula 1, and Snooker. A fan of Real Madrid, Mercedes AMG Petronas F1 Team, Ronnie O'Sullivan, and Coldplay.