Category: Laravel, Laravel, PHP, PHP, api, api

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. You are developing a RESTful API and want to let your users filter the indexes with different fields or even on the relations of your model.

How could you filter all the articles of a specific user?

Let’s add a filter to our API to find all the articles of user with id = 1.

In the next step, we are going to setup the basic project and then start adding these dynamic filters to that.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners