PHPackages                             userwebdevelop/yii2-base-query - 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. userwebdevelop/yii2-base-query

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

userwebdevelop/yii2-base-query
==============================

Расширение для ActiveQuery

1.0(8mo ago)013↓100%MITPHPPHP &gt;=7.4

Since Aug 19Pushed 8mo agoCompare

[ Source](https://github.com/userwebdevelop/yii2-base-query)[ Packagist](https://packagist.org/packages/userwebdevelop/yii2-base-query)[ RSS](/packages/userwebdevelop-yii2-base-query/feed)WikiDiscussions master Synced 1mo ago

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

Расширение ActiveQuery для более удобной фильтрации и сортировки.

для установки нужно в `/common/config/bootstrap.php` добавить следующий код:

```
Yii::$container->set(
    \yii\db\ActiveQuery::class,
    function ($container, $params) {
        return new \userwebdevelop\yii2BaseQuery\BaseQuery($params[0]);
    }
);
```

activeAndSorted() — активные + сортировка по sort и id. active() — выборка только со status = 1. sortedBySort() — сортировка по sort ASC, id DESC. sortedByAttribute($attribute, $sortType = SORT\_DESC) — сортировка по атрибуту + id DESC.

Можно добавлять свои подобные методы, упрощающие работу с ORM в Yii2

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance59

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

Unknown

Total

1

Last Release

263d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6502aa6c7e854255c536740ee2a90de36d83108412bbb9975be18668db510395?d=identicon)[userwebdevelop](/maintainers/userwebdevelop)

---

Top Contributors

[![wasss4bi](https://avatars.githubusercontent.com/u/150638703?v=4)](https://github.com/wasss4bi "wasss4bi (5 commits)")

### Embed Badge

![Health badge](/badges/userwebdevelop-yii2-base-query/health.svg)

```
[![Health](https://phpackages.com/badges/userwebdevelop-yii2-base-query/health.svg)](https://phpackages.com/packages/userwebdevelop-yii2-base-query)
```

###  Alternatives

[yii2tech/illuminate

Yii2 to Laravel Migration Package

11315.1k](/packages/yii2tech-illuminate)[mootensai/yii2-relation-trait

Yii 2 Models load with relation, &amp; transaction save with relation

47220.3k9](/packages/mootensai-yii2-relation-trait)[nhkey/yii2-activerecord-history

Storage history of changes to ActiveRecord

46143.4k1](/packages/nhkey-yii2-activerecord-history)[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)[urbanindo/yii2-dynamodb

DynamoDB extensions for Yii2

1471.4k](/packages/urbanindo-yii2-dynamodb)[spanjeta/yii2-backup

Database Backup and Restore functionality

285.0k1](/packages/spanjeta-yii2-backup)

PHPackages © 2026

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