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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners