PHPackages                             ukfast/laravel-sieve - 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. ukfast/laravel-sieve

Abandoned → [ans-group/laravel-sieve](/?search=ans-group%2Flaravel-sieve)Library[Search &amp; Filtering](/categories/search)

ukfast/laravel-sieve
====================

A library for filtering eloquent queries

v1.2.0(5mo ago)47.8k↓50%4[3 issues](https://github.com/ans-group/laravel-sieve/issues)MITPHPPHP ^8.2CI failing

Since Oct 27Pushed 5mo ago7 watchersCompare

[ Source](https://github.com/ans-group/laravel-sieve)[ Packagist](https://packagist.org/packages/ukfast/laravel-sieve)[ RSS](/packages/ukfast-laravel-sieve/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (45)Used By (0)

[![UKFast Logo](https://camo.githubusercontent.com/51188f1ebbb9dddb6c0605e7090af67643c3a54f862bd284d6d93e90b2dea20b/68747470733a2f2f696d616765732e756b666173742e636f2e756b2f6c6f676f732f756b666173742f343431783132365f7472616e73706172656e745f73747261706c696e652e706e67)](https://camo.githubusercontent.com/51188f1ebbb9dddb6c0605e7090af67643c3a54f862bd284d6d93e90b2dea20b/68747470733a2f2f696d616765732e756b666173742e636f2e756b2f6c6f676f732f756b666173742f343431783132365f7472616e73706172656e745f73747261706c696e652e706e67)

Laravel Sieve
=============

[](#laravel-sieve)

A library to handle filtering and sorting for your APIs

Filters like `/pets?name:in=Snoopy,Hobbes` will be applied to your query builder instance and only results matching that criteria will return

Installation
------------

[](#installation)

First, use composer to require the package as below:

```
composer require ans-group/laravel-sieve

```

In Laravel the service provider will be automatically discovered.

If you are using Lumen you will need to register the service provider in the "Register Service Providers" section of `bootstrap/app.php`:

```
$app->register(UKFast\Sieve\SieveServiceProvider::class);

```

Usage
-----

[](#usage)

Sieve uses an expressive API to configure these filters:

```
