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 yesterday

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 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity32

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://www.gravatar.com/avatar/00e59f3dc17a1d430b4f4f59d3cfd5ab0f6a6350c19e7fcfca0f0a2d05ed1f6a?d=identicon)[vking](/maintainers/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

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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