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

ActiveLibrary

simplecms/wechat
================

微信小程序

1.0.1(1y ago)0271MITPHPPHP &gt;=8.0

Since Jul 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hackout/simplecms-wechat)[ Packagist](https://packagist.org/packages/simplecms/wechat)[ RSS](/packages/simplecms-wechat/feed)WikiDiscussions master Synced 1mo ago

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

微信小程序小插件
========

[](#微信小程序小插件)

仅处理code openid 及推送、后端服务

安装
--

[](#安装)

```
composer require simplecms/wechat
```

配置.env
------

[](#配置env)

```
WECHAT_PROGRAM_APPID="小程序APPID"
WECHAT_PROGRAM_SECRET="小程序secret"
```

推送消息
----

[](#推送消息)

```
use SimpleCMS\Wechat\Facades\MiniProgram;
//发送推送消息
return MiniProgram::postMessage(openId:'xxxx',templateId:'xxxxx',data:[]);
```

### 监听后端消息

[](#监听后端消息)

在`App\Providers\AppServiceProvider`的boot中增加事件监听

```
use Illuminate\Support\Facades\Event;

//监听登录
//前端URL: /api/wechat/mini/token/{code}
Event::listen('plugin.wechat.code2session',function(string $openId){
           //...Todo..
        });

//监听后端
//前端URL: /api/wechat/serve
Event::listen('plugin.message',function($event='subscribe', $message, \Closure $next){
           //...Todo..
        });
```

Facades
-------

[](#facades)

```
use SimpleCMS\Wechat\Facades\MiniProgram; #地理位置
```

其他说明
----

[](#其他说明)

更多操作参考IDE提示

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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

660d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e86728cb7944f155dc7c047658fe99f1aeaf605cd2f790dfa0d928540fe7f20f?d=identicon)[hackout](/maintainers/hackout)

---

Top Contributors

[![hackout](https://avatars.githubusercontent.com/u/9741288?v=4)](https://github.com/hackout "hackout (2 commits)")

---

Tags

laravelwechatSimpleCMS

### Embed Badge

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

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

###  Alternatives

[overtrue/laravel-wechat

微信 SDK for Laravel

3.0k1.8M53](/packages/overtrue-laravel-wechat)[ibrand/wechat-backend

wechat backend for Laravel Application.

133.7k](/packages/ibrand-wechat-backend)

PHPackages © 2026

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