abbasudo/laravel-purity
Laravel Purity adds elegant filtering and sorting to Eloquent queries via a simple filter() method. Let frontend users drive complex query conditions using URL query string parameters (e.g., filters[title][$contains]=Purity), with minimal boilerplate.
Laravel Purity is an elegant and efficient filtering and sorting package for Laravel, designed to simplify complex data filtering and sorting logic for eloquent queries. By simply adding filter() to your Eloquent query, you can add the ability for frontend users to apply filters based on URL query string parameters like a breeze.
Features :
Laravel Purity is not only developer-friendly but also front-end developer-friendly. Frontend developers can effortlessly use filtering and sorting of the APIs by using the popular JavaScript qs package.
The way this package handles filters is inspired by strapi's filter and sort functionality.
Here is a basic usage example to clarify Purity's use case.
Add filter() to your query.
$posts = Post::filter()->get();
That's it! Now you can filter your posts by adding query string parameters to the URL.
GET /api/posts?filters[title][$contains]=Purity
How can I help you explore Laravel packages today?