PHPackages                             rondigital/query-filter - 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. rondigital/query-filter

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

rondigital/query-filter
=======================

Filter and search in Laravel Model.

v1.5(2y ago)02.2kMITPHP

Since Aug 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Ron-Digital/query-filter-package)[ Packagist](https://packagist.org/packages/rondigital/query-filter)[ RSS](/packages/rondigital-query-filter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Query Filter and Search
=======================

[](#query-filter-and-search)

Filter and search in Laravel Model.

```
composer require rondigital/query-filter
```

The QueryFilter is a trait used for filter, multiple filter and search in Laravel Model. You can install it using the composer command mentioned above. To use it in your class, add the following line with the "use" keyword:

```
use Rondigital\QueryFilter\QueryFilter;

class YourClass {

use QueryFilter;
// ...
}
```

Parameters:

- **startingDate** : must be Y-M-D H:i:s
- **endingDate** : must be Y-M-D H:i:s
- **filteredBy** : must be;
    - *today*
    - *last-24*
    - *last-7-day*
    - *last-30-day*
    - *last-60-day*
    - *last-90-day*
    - *last-year*
    - *this-month*
    - *last-month*
    - *this-week*
    - *last-week*
- **search** : must be search value
    - **searchColumn** : must be column name
- **orderBy** : must be column name
- **orderType** : must be asc/desc

Inside your function, you can use it as follows:

```
$model = Model::all();
return $this->query($model, $request);
```

ex:

```
 http://localhost:8000/api/files?search=pdf&searchColumn=extension&filteredBy=today&orderType=asc&orderBy=extension&perPage=1
```

Response / 200 OK

```
{
    "current_page": 1,
    "data": [
        {
            "id": 6,
            "user_id": 23,
            "filename": "1686910391_siuqkT7MvLsmvpVH",
            "real_filename": "seller-288138-barkod-bazlı-iptal-raporu-2023.05.03-18.17.56.pdf",
            "extension": "pdf",
            "deleted_at": null,
            "created_at": "2023-06-16T10:13:11.000000Z",
            "updated_at": "2023-06-16T10:13:11.000000Z"
        }
    ],
    "first_page_url": "http://localhost:8008/api/files?page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "http://localhost:8008/api/files?page=3",
    "links": [
        {
            "url": null,
            "label": "&laquo; Previous",
            "active": false
        },
        {
            "url": "http://localhost:8008/api/files?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "http://localhost:8008/api/files?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "http://localhost:8008/api/files?page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "http://localhost:8008/api/files?page=2",
            "label": "Next &raquo;",
            "active": false
        }
    ],
    "next_page_url": "http://localhost:8008/api/files?page=2",
    "path": "http://localhost:8008/api/files",
    "per_page": 1,
    "prev_page_url": null,
    "to": 1,
    "total": 3
}
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~3 days

Total

6

Last Release

991d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/533c17d66ddb91387d405b60a71ef5e3dd5d8a274b43b7d7bcd4bd65fc152ddb?d=identicon)[cerenozkurt](/maintainers/cerenozkurt)

---

Top Contributors

[![cerenozkurt](https://avatars.githubusercontent.com/u/33186246?v=4)](https://github.com/cerenozkurt "cerenozkurt (4 commits)")[![Deryababul](https://avatars.githubusercontent.com/u/79054754?v=4)](https://github.com/Deryababul "Deryababul (2 commits)")

### Embed Badge

![Health badge](/badges/rondigital-query-filter/health.svg)

```
[![Health](https://phpackages.com/badges/rondigital-query-filter/health.svg)](https://phpackages.com/packages/rondigital-query-filter)
```

###  Alternatives

[spatie/laravel-site-search

A site search engine

300129.1k](/packages/spatie-laravel-site-search)[kyslik/laravel-filterable

Using URL query strings to filter Eloquent queries.

11539.0k](/packages/kyslik-laravel-filterable)[stolz/laravel-html-tidy

HTML Tidy middleware for Laravel

268.7k](/packages/stolz-laravel-html-tidy)

PHPackages © 2026

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