PHPackages                             awstalib/filterable-qm - 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. awstalib/filterable-qm

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

awstalib/filterable-qm
======================

Filterable Query or model Package

2.0.1(2y ago)014MITPHPPHP &gt;=7.2

Since Jan 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/awstalib/FilterableQm)[ Packagist](https://packagist.org/packages/awstalib/filterable-qm)[ RSS](/packages/awstalib-filterable-qm/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

FilterableQm Laravel Package
============================

[](#filterableqm-laravel-package)

FilterableQm is a Laravel package that provides traits for filtering and paginating Eloquent models seamlessly. It includes the `FilterableQm` trait for filtering models and the `PaginateQm` trait for easy pagination.

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

[](#installation)

You can install the package via Composer. Run the following command:

```
composer require awstalib/filterable-qm
```

Usage
-----

[](#usage)

FilterableQm Trait In your Eloquent model, use the FilterableQm trait:

```
use Awstalib\FilterableQm\FilterableQm;

class YourModel extends Model
{
    use FilterableQm;

    // Your model logic here
}
```

Use the applyFilters method on your model's query builder:

```
$filteredData = YourModel::query()->applyFilters($filters)->get();
```

PaginateQm Trait In your Eloquent model, use the PaginateQm trait:

```
use Awstalib\FilterableQm\PaginateQm;

class YourModel extends Model
{
    use PaginateQm;
    protected $filterItem=['col1','col2'];
     // Your model logic here
    //You can extend filter with your own filter
    public function extendedFilter($query, $filterItem, $value)
    {
        if ($filterItem === 'account_currency' && !empty($value)) {
            $query->whereHas('account', function ($query) use ($value) {
                $query->where('currency_id', $value);
            });
        }
        if($filterItem === 'account_number' && !empty($value)) {
            $query->whereHas('account', function ($query) use ($value) {
                $query->where('account_number', $value);
            });
        }
        return $query;
    }

}
```

Utilize the paginateModel method in your controller:

```
public function index(Request $request)
{
    $data = $this->paginateModel(new YourModel(), $request, false);
    return ApiResponse::success($data->data, 'Data retrieved successfully', null, $data->count);
}
```

Version History
---------------

[](#version-history)

### 1.0.0 (January 7, 2024)

[](#100-january-7-2024)

- Initial release.
- Added `FilterableQm` and `PaginateQm` traits.
- Basic filtering and pagination functionality.

Contributing
------------

[](#contributing)

Feel free to contribute to this project by forking it and creating a pull request.

License
-------

[](#license)

This package is open-source and available under the MIT License.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

2

Last Release

889d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/71706396?v=4)[aws talib](/maintainers/awstalib)[@awstalib](https://github.com/awstalib)

---

Top Contributors

[![awstalib](https://avatars.githubusercontent.com/u/71706396?v=4)](https://github.com/awstalib "awstalib (34 commits)")

---

Tags

laravelpaginationqueryfilterable

### Embed Badge

![Health badge](/badges/awstalib-filterable-qm/health.svg)

```
[![Health](https://phpackages.com/badges/awstalib-filterable-qm/health.svg)](https://phpackages.com/packages/awstalib-filterable-qm)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.3M18](/packages/reedware-laravel-relation-joins)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)[omalizadeh/laravel-query-filter

A laravel package for resource filtering via request query string

153.0k](/packages/omalizadeh-laravel-query-filter)

PHPackages © 2026

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