PHPackages                             abbasudo/laravel-purity - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. abbasudo/laravel-purity

ActiveLibrary[Database &amp; ORM](/categories/database)

abbasudo/laravel-purity
=======================

elegant way to add filter and sort in laravel

v3.3.9(4mo ago)517435.2k—4%60[19 issues](https://github.com/abbasudo/laravel-purity/issues)[5 PRs](https://github.com/abbasudo/laravel-purity/pulls)1MITPHPPHP ^8.0CI passing

Since Feb 27Pushed 4mo ago5 watchersCompare

[ Source](https://github.com/abbasudo/laravel-purity)[ Packagist](https://packagist.org/packages/abbasudo/laravel-purity)[ Patreon](https://www.patreon.com/abbasudo)[ RSS](/packages/abbasudo-laravel-purity/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (6)Versions (25)Used By (1)

 [![Social Card of Laravel Purity](https://github.com/abbasudo/laravel-purity/raw/master/art/purity-logo.png)](https://github.com/abbasudo/laravel-purity/raw/master/art/purity-logo.png)

Elegant way to filter and sort queries in Laravel
=================================================

[](#elegant-way-to-filter-and-sort-queries-in-laravel)

[![Tests](https://github.com/abbasudo/laravel-purity/actions/workflows/tests.yml/badge.svg)](https://github.com/abbasudo/laravel-purity/actions/workflows/tests.yml)[![License](https://camo.githubusercontent.com/c59e55445653e893b28e4816941a2bf8793f6997efa4230eca2b2c58378455b9/687474703a2f2f706f7365722e707567782e6f72672f616262617375646f2f6c61726176656c2d7075726974792f6c6963656e7365)](https://github.com/abbasudo/laravel-purity)[![Latest Unstable Version](https://camo.githubusercontent.com/b15ed6ddcc9650b8215c914ac03f159f7784cb66baac0fe4eb435eda956c3fee/687474703a2f2f706f7365722e707567782e6f72672f616262617375646f2f6c61726176656c2d7075726974792f76)](https://packagist.org/packages/abbasudo/laravel-purity)[![PHP Version Require](https://camo.githubusercontent.com/4f737efed6fd894442b7f2ed17762ca72a93e35e535c9a342523fad0671d8388/687474703a2f2f706f7365722e707567782e6f72672f616262617375646f2f6c61726176656c2d7075726974792f726571756972652f706870)](https://packagist.org/packages/abbasudo/laravel-purity)[![StyleCI](https://camo.githubusercontent.com/a9e55d2a963fbfa39d7e2a68dfcff67d5245d322f7b342b44ed788a87718bacc/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3630333933313433332f736869656c64)](https://packagist.org/packages/abbasudo/laravel-purity)

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?
---------------------

[](#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](https://abbasudo.github.io/laravel-purity/)

Documentation
-------------

[](#documentation)

License
-------

[](#license)

Laravel Purity is Licensed under The MIT License (MIT). Please see [License File](https://github.com/abbasudo/laravel-purity/blob/master/LICENSE) for more information.

Security
--------

[](#security)

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

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance73

Regular maintenance activity

Popularity59

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 71.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~137 days

Total

24

Last Release

147d ago

Major Versions

v1.1.0 → v2.0.02023-10-19

v2.1.0 → v3.0.02024-02-07

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.5PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a0ca6557a86a960db779a28137c6bfaebecee04c511c341c27ae8aa1ce2b228?d=identicon)[abbasudo](/maintainers/abbasudo)

---

Top Contributors

[![abbasudo](https://avatars.githubusercontent.com/u/86796762?v=4)](https://github.com/abbasudo "abbasudo (293 commits)")[![Lakshan-Madushanka](https://avatars.githubusercontent.com/u/47297673?v=4)](https://github.com/Lakshan-Madushanka "Lakshan-Madushanka (38 commits)")[![num8er](https://avatars.githubusercontent.com/u/603434?v=4)](https://github.com/num8er "num8er (21 commits)")[![phrshteh](https://avatars.githubusercontent.com/u/52778589?v=4)](https://github.com/phrshteh "phrshteh (17 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (14 commits)")[![adamgroom](https://avatars.githubusercontent.com/u/2169364?v=4)](https://github.com/adamgroom "adamgroom (3 commits)")[![zr-msv](https://avatars.githubusercontent.com/u/71141595?v=4)](https://github.com/zr-msv "zr-msv (2 commits)")[![AhmedMedDev](https://avatars.githubusercontent.com/u/67242566?v=4)](https://github.com/AhmedMedDev "AhmedMedDev (2 commits)")[![ItsReddi](https://avatars.githubusercontent.com/u/3147888?v=4)](https://github.com/ItsReddi "ItsReddi (2 commits)")[![jespermeller](https://avatars.githubusercontent.com/u/64839813?v=4)](https://github.com/jespermeller "jespermeller (2 commits)")[![KierynAnnette](https://avatars.githubusercontent.com/u/93209746?v=4)](https://github.com/KierynAnnette "KierynAnnette (2 commits)")[![mahtab-m](https://avatars.githubusercontent.com/u/71141595?v=4)](https://github.com/mahtab-m "mahtab-m (2 commits)")[![rbaskam](https://avatars.githubusercontent.com/u/13821245?v=4)](https://github.com/rbaskam "rbaskam (2 commits)")[![tolyod](https://avatars.githubusercontent.com/u/1892972?v=4)](https://github.com/tolyod "tolyod (2 commits)")[![zoispag](https://avatars.githubusercontent.com/u/21138205?v=4)](https://github.com/zoispag "zoispag (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![TryV](https://avatars.githubusercontent.com/u/35303148?v=4)](https://github.com/TryV "TryV (1 commits)")[![sabist](https://avatars.githubusercontent.com/u/10257955?v=4)](https://github.com/sabist "sabist (1 commits)")[![chriswillow](https://avatars.githubusercontent.com/u/20992789?v=4)](https://github.com/chriswillow "chriswillow (1 commits)")[![LasseSLambertsen](https://avatars.githubusercontent.com/u/16749193?v=4)](https://github.com/LasseSLambertsen "LasseSLambertsen (1 commits)")

---

Tags

eloquentfilterfilteringfilterslaravelmysqlphpqueriessortsql

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abbasudo-laravel-purity/health.svg)

```
[![Health](https://phpackages.com/badges/abbasudo-laravel-purity/health.svg)](https://phpackages.com/packages/abbasudo-laravel-purity)
```

###  Alternatives

[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

11.3k4.0k](/packages/leantime-leantime)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

137236.2k8](/packages/statamic-rad-pack-runway)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11225.5M36](/packages/anourvalar-eloquent-serialize)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
