PHPackages                             buddysoft/yii2-widget - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. buddysoft/yii2-widget

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

buddysoft/yii2-widget
=====================

Commonly used widgets

v3.2.0(1y ago)02811MITJavaScriptPHP &gt;=5.6.15CI failing

Since Nov 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/liuwanwei/yii2-widget)[ Packagist](https://packagist.org/packages/buddysoft/yii2-widget)[ Docs](https://github.com/liuwanwei/yii2-widget)[ RSS](/packages/buddysoft-yii2-widget/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (53)Used By (0)

常用组件，都封装在这里
===========

[](#常用组件都封装在这里)

controllers
-----------

[](#controllers)

从 v3.0.0 开始，移除 API 相关代码。

generators
----------

[](#generators)

自定义 gii generators。

- search: 实现了为 model 创建 search model 的功能

使用方法：

在 main-local.php 中按照以下内容修改：

```
$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    // 添加下面内容
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'],
    'generators' => [
        'search' => [
            'class' => 'buddysoft\widget\generators\search\Generator',
            'templates' => [
                'myCrud' => 'buddysoft\widget\generators\search\default',
            ]
        ]
    ]
];
```

migrations
----------

[](#migrations)

继承了为 mdmsoft/yii2-admin 模块创建第一个默认用户的 migration，使用方式

```
./yii migrate --migrationPath=@buddysoft/widget/migrations
```

BDAR 类
------

[](#bdar-类)

- 自动处理 sid 字段
- 根据配置参数自动处理 secretFields 和 exceptFields

```
    // 不需要返回给客户端的字段，所有 Model 通用
    'secretFields' => ['id', 'createdAt', 'updatedAt', 'accessToken'],
    // 在某些请求中，依然需要返回给客户端，但是存在于 secretFields 数组中的字段
    'exceptFields' => [
        [
            'routes' => ['site/login'], // 如果设置了 url rules 重定向，必须使用重定向后的路由
            'models' => ['User'],       // 需要排除特殊字段的 Model 类名字
            'fields' => ['accessToken'],// 需要排除的字段名字
        ],
        [
            'routes' => ['notice/index', 'notice/view', 'receipt/index', 'receipt/view'],
            'models' => ['Notice', 'Receipt'],
            'fields' => ['createdAt', 'updatedAt'],
        ],
    ],
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance40

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% 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 ~56 days

Recently: every ~301 days

Total

52

Last Release

628d ago

Major Versions

v1.2.3 → v2.0.02018-09-20

v1.2.4 → v2.1.52020-11-05

v2.2.5 → v3.0.02022-02-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/16d22936eaad779f55f92f099fe68ba14e67990b6c66b83dd278c7143004fc4d?d=identicon)[liuwanwei](/maintainers/liuwanwei)

---

Top Contributors

[![liuwanwei](https://avatars.githubusercontent.com/u/62382?v=4)](https://github.com/liuwanwei "liuwanwei (84 commits)")[![flyhqxfly](https://avatars.githubusercontent.com/u/14325662?v=4)](https://github.com/flyhqxfly "flyhqxfly (1 commits)")

### Embed Badge

![Health badge](/badges/buddysoft-yii2-widget/health.svg)

```
[![Health](https://phpackages.com/badges/buddysoft-yii2-widget/health.svg)](https://phpackages.com/packages/buddysoft-yii2-widget)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

582110.9M40.0k](/packages/illuminate-support)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

292943.4k27](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

53675.5k16](/packages/solspace-craft-freeform)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40140.4k2](/packages/erlandmuchasaj-laravel-gzip)[japanese-date/japanese-date

日本の暦、祝日を取り扱うライブラリ

169.9k](/packages/japanese-date-japanese-date)

PHPackages © 2026

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