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 1mo 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 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

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

833d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c8fe2d02d1088f93fe4146f994a565dfb6e1abcbff4050005c61808d2ede7dc?d=identicon)[awstalib](/maintainers/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

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[mehdi-fathi/eloquent-filter

Eloquent Filter adds custom filters automatically to your Eloquent Models in Laravel.It's easy to use and fully dynamic, just with sending the Query Strings to it.

450191.6k1](/packages/mehdi-fathi-eloquent-filter)[omalizadeh/laravel-query-filter

A laravel package for resource filtering via request query string

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

PHPackages © 2026

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