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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hanson/wechat-notice
====================

Wechat notice

v1.0.0(9y ago)211646PHP

Since Feb 16Pushed 9y ago2 watchersCompare

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

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

wechat-notice
=============

[](#wechat-notice)

wechat-notcie 是基于 `laravel` 和 [EasyWechat](https://github.com/overtrue/wechat) 开发的微信消息模板通知功能

安装
--

[](#安装)

```
composer require hanson/wechat-notice

```

添加 `Hanson\WechatNotice\NoticeServiceProvider::class` 到 `app.php` 的 `providers` 中

使用
--

[](#使用)

### config

[](#config)

当不做任何设置时，Notice会自动读取 `config('services.wechat')` 的配置

```
\WechatNotice::send($openId, $templateId, [
    'first' => '系统异常',
    'keyword1' => '',
    'keyword2' => '',
    'keyword3' => '',
    'remark' => '请及时处理'
]);

```

### 已存在实例

[](#已存在实例)

```
$wechat = new Application([
    'app_id'  => $appId,
    'secret'  => $secret,
]);

\WechatNotice::setWechat($wechat)->send($openId, $templateId, [
    'first' => '系统异常',
    'keyword1' => '',
    'keyword2' => '',
    'keyword3' => '',
    'remark' => '请及时处理'
], null, '#af0505');

```

### 直接设置配置

[](#直接设置配置)

```
\WechatNotice::setConfig([
    'app_id'  => $appId,
    'secret'  => $secret,
])->send($openId, $templateId, [
    'first' => '系统异常',
    'keyword1' => '',
    'keyword2' => '',
    'keyword3' => '',
    'remark' => '请及时处理'
]);

```

### 发送给多个用户

[](#发送给多个用户)

```
\WechatNotice::send([$openId, $openId2, $openId3, ...], $templateId, [
    'first' => '系统异常',
    'keyword1' => '',
    'keyword2' => '',
    'keyword3' => '',
    'remark' => '请及时处理'
]);

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3414d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10583423?v=4)[hanson](/maintainers/hanson)[@Hanson](https://github.com/Hanson)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hanson/laravel-work-exception

133.8k](/packages/hanson-laravel-work-exception)

PHPackages © 2026

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