PHPackages                             hanson/wechat-handler - 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. hanson/wechat-handler

ActiveLibrary

hanson/wechat-handler
=====================

1.0.17(9y ago)11641PHP

Since Aug 5Pushed 9y ago2 watchersCompare

[ Source](https://github.com/HanSon/wechat-handler)[ Packagist](https://packagist.org/packages/hanson/wechat-handler)[ RSS](/packages/hanson-wechat-handler/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (1)Versions (10)Used By (0)

wechat-handler
==============

[](#wechat-handler)

A package to create some base handler for wechat events faster! 帮你更快地生成微信事件文件

依赖
--

[](#依赖)

laravel 5+ (lumen 请看 [wechat](https://github.com/HanSon/wechat))

EasyWechat 3+

安装
--

[](#安装)

```
composer require hanson/wechat-handler

```

使用
--

[](#使用)

在`config/app.php`的provider尾部加上

```

    App\Providers\EventServiceProvider::class,

    App\Providers\RouteServiceProvider::class,
    # 加上
    Hanson\Wechat\Handler\WechatHandlerServiceProvider::class,

```

然后执行`php artisan make:handler`

接下来会生成若干文件

`app\Handler`目录，负责处理所有的微信事件

`app\Http\Controllers\Wechat`为微信的controller

`config\wechat.php` 微信的配置（自行选择是否使用）

文档
--

[](#文档)

### Handler

[](#handler)

所有消息事件都位于`app/Handlers`中，事件Handler位于`app/Handlers/EventHandlers`中

### Service

[](#service)

所有的服务事件，直接在继承BaseController 的 Controller中 调用 $this-&gt;service即可

```
#example:
class MyController extends BaseController{

    public function index(){
        $user = $this->user;
        echo $user->get('openid')->nickname;
    }
}

```

###  Health Score

32

—

LowBetter than 74% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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

9

Last Release

3511d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/998d7b42b1dc8c352825b1c6546a1aa0fd0b28eb5cefe4059a727e8181594956?d=identicon)[hanson](/maintainers/hanson)

---

Top Contributors

[![Hanson](https://avatars.githubusercontent.com/u/10583423?v=4)](https://github.com/Hanson "Hanson (21 commits)")

### Embed Badge

![Health badge](/badges/hanson-wechat-handler/health.svg)

```
[![Health](https://phpackages.com/badges/hanson-wechat-handler/health.svg)](https://phpackages.com/packages/hanson-wechat-handler)
```

###  Alternatives

[jaguarjack/catchadmin

The CatchAdmin Background management

8952.6k](/packages/jaguarjack-catchadmin)[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

26616.1k1](/packages/naixiaoxin-think-wechat)[jianyan74/yii2-easy-wechat

WeChat SDK for yii2, 基于 overtrue/easywechat

14339.4k1](/packages/jianyan74-yii2-easy-wechat)[hanson/laravel-admin-wechat

2424.2k](/packages/hanson-laravel-admin-wechat)[easywechat/console

A command line for EasyWeChat Application.

2533.9k](/packages/easywechat-console)[naixiaoxin/hyperf-wechat

Wechat SDK For Hyperf

141.8k](/packages/naixiaoxin-hyperf-wechat)

PHPackages © 2026

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