PHPackages                             42sol/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. [Search &amp; Filtering](/categories/search)
4. /
5. 42sol/laravel-purity

ActiveLibrary[Search &amp; Filtering](/categories/search)

42sol/laravel-purity
====================

elegant way to add filter and sort in laravel

07PHP

Since Jan 30Pushed 3mo agoCompare

[ Source](https://github.com/42-sol/laravel-purity)[ Packagist](https://packagist.org/packages/42sol/laravel-purity)[ RSS](/packages/42sol-laravel-purity/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 [![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

21

—

LowBetter than 19% of packages

Maintenance54

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7752531d8f8f9f25c6813511f5d23618ad4840a9c380877ce3c2eefdfc029310?d=identicon)[disaipe](/maintainers/disaipe)

---

Top Contributors

[![abbasudo](https://avatars.githubusercontent.com/u/86796762?v=4)](https://github.com/abbasudo "abbasudo (292 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)")[![disaipe](https://avatars.githubusercontent.com/u/15032597?v=4)](https://github.com/disaipe "disaipe (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)")[![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)")[![chriswillow](https://avatars.githubusercontent.com/u/20992789?v=4)](https://github.com/chriswillow "chriswillow (1 commits)")[![carlos-talavera](https://avatars.githubusercontent.com/u/43124259?v=4)](https://github.com/carlos-talavera "carlos-talavera (1 commits)")[![LasseSLambertsen](https://avatars.githubusercontent.com/u/16749193?v=4)](https://github.com/LasseSLambertsen "LasseSLambertsen (1 commits)")

### Embed Badge

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

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

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M202](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M64](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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