abbasudo/laravel-purity

elegant way to add filter and sort in laravel
529,234 515
Install
composer require abbasudo/laravel-purity
Latest Version:v3.3.9
PHP:^8.0
Laravel:8 – 13
License:MIT
Last Updated:Mar 25, 2026
Links: GitHub  ·  Packagist
Maintainer: abbasudo

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.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP Laravel License
v3.3.9 ^8.0 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v3.3.8 ^8.0 ^11.0|^10.0|^9.0|^8.0|^12.0 MIT
v3.3.7 ^8.0 ^11.0|^10.0|^9.0|^8.0 MIT
v3.3.6 ^8.0 ^11.0|^10.0|^9.0|^8.0 MIT
v3.3.5 ^8.0 ^11.0|^10.0|^9.0|^8.0 MIT