abbasudo/laravel-purity

elegant way to add filter and sort in laravel

Fund package maintenance!
Patreon

Installs: 105 161

Dependents: 0

Suggesters: 0

Security: 0

Stars: 477

Watchers: 5

Forks: 45

Open Issues: 12

v3.3.7 2024-10-29 18:33 UTC

README

Social Card of Laravel Purity

Elegant way to filter and sort queries in Laravel

Tests License Latest Unstable Version PHP Version Require StyleCI

Laravel Purity is an elegant and yet simple 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.

How Does Purity Work?

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

read more at official documentations

Documentation

https://abbasudo.github.io/laravel-purity/

License

Laravel Purity is Licensed under The MIT License (MIT). Please see License File for more information.

Security

If you've found a bug regarding security, please mail amkhzomi@gmail.com instead of using the issue tracker.