PHPackages                             vking/laravel-notification-wxlite - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. vking/laravel-notification-wxlite

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

vking/laravel-notification-wxlite
=================================

Laravel Notification Wechat lite app Channel

00PHP

Since Sep 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/myzingy/laravel-notification-wxlite)[ Packagist](https://packagist.org/packages/vking/laravel-notification-wxlite)[ RSS](/packages/vking-laravel-notification-wxlite/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel 微信 小程序 订阅消息 通知系统
========================

[](#laravel-微信-小程序-订阅消息-通知系统)

基本要求：
-----

[](#基本要求)

- php&gt;=7.0
- 已集成 overtrue/laravel-wechat 并配置好了小程序信息
- 已做好队列工作（非强制，做了更好）

用法：
---

[](#用法)

#### 1、 composer require vking/laravel-notification-wxlite

[](#1-composer-require-vkinglaravel-notification-wxlite)

#### 2、 php artisan make:notification YouerNotice

[](#2-php-artisan-makenotification-youernotice)

#### 3、 编辑 YouerNotice

[](#3-编辑-youernotice)

```
public $data;
public function __construct($data)
{
    //
    $this->data=$data;
}
public function via($notifiable)
{
    return [WxliteChannel::class];
}
#添加 toWechat 函数，名称必须是 toWechat
public function toWechat($notifiable){
    return new WxliteMessage(
    "订阅消息id",
    [
        'name1' => [
            'value' => $name1,
        ],
        'name1' => [
            'value' => $name1,
        ],
    ],
    "小程序的页面地址"
    );
}

```

#### 4、 你的用户模型（或wechat表模型）中增加 routeNotificationForWechat

[](#4-你的用户模型或wechat表模型中增加-routenotificationforwechat)

```
use Notifiable;
public function routeNotificationForWechat(){
   	return $this->openid;
}
```

#### 5、 调用,以wechat模型为例

[](#5-调用以wechat模型为例)

```
#case 1，单发
$wechat=wechat::find('openid');
$wechat->notify(new YouerNotice($一些数据));

#case 2，发给多人
$wechats=wechat::where(...)->get()
Notification::send($wechats,new YouerNotice($一些数据));
```

#### 6、 log的打印，wxlite.send 开头的数据

[](#6-log的打印wxlitesend-开头的数据)

祝好运

感谢
--

[](#感谢)

> overtrue/laravel-wechat（这么完美的微信框架，做微信都离不开吧） 以及各种laravel-notification-channels的代码参考学习 等等前人

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 65.2% 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.

### Community

Maintainers

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

---

Top Contributors

[![rxrw](https://avatars.githubusercontent.com/u/9566402?v=4)](https://github.com/rxrw "rxrw (15 commits)")[![vkingx](https://avatars.githubusercontent.com/u/38235069?v=4)](https://github.com/vkingx "vkingx (7 commits)")[![reprover](https://avatars.githubusercontent.com/u/16271768?v=4)](https://github.com/reprover "reprover (1 commits)")

### Embed Badge

![Health badge](/badges/vking-laravel-notification-wxlite/health.svg)

```
[![Health](https://phpackages.com/badges/vking-laravel-notification-wxlite/health.svg)](https://phpackages.com/packages/vking-laravel-notification-wxlite)
```

###  Alternatives

[maize-tech/laravel-email-domain-rule

Laravel Email Domain Rule

612.0k](/packages/maize-tech-laravel-email-domain-rule)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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