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

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

zacksleo/laravel-notification-wechat
====================================

Package description here.

1.0.0(6y ago)04661[1 issues](https://github.com/zacksleo/laravel-notification-wechat/issues)MITPHP

Since Aug 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/zacksleo/laravel-notification-wechat)[ Packagist](https://packagist.org/packages/zacksleo/laravel-notification-wechat)[ RSS](/packages/zacksleo-laravel-notification-wechat/feed)WikiDiscussions master Synced yesterday

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

 laravel-notification-wechat
=============================

[](#-laravel-notification-wechat-)

 .

Installing
----------

[](#installing)

```
$ composer require zacksleo/laravel-notification-wechat -vvv
```

Usage
-----

[](#usage)

### 创建通知类

[](#创建通知类)

```
$ php artisan make:notification InvoicePaid
```

```
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Zacksleo\LaravelNotificationWechat\MiniProgramChannel;
use Zacksleo\LaravelNotificationWechat\OfficialAccountChannel;
use Zacksleo\LaravelNotificationWechat\Messages\MiniProgramTemplateMessage;
use Zacksleo\LaravelNotificationWechat\Messages\OfficialAccountTemplateMessage;

class InvoicePaid extends Notification implements ShouldQueue
{
    use Queueable;

    // ...
}
```

### 公众号模板消息

[](#公众号模板消息)

```
public function via($notifiable)
{
    return [OfficialAccountChannel::class];
}

public function toWechatOfficialAccount($notifiable): OfficialAccountTemplateMessage
{
    return (new OfficialAccountTemplateMessage)
    ->to('接收用户的 openid')
    ->template('模板 ID')
    ->url('网页地址，如 https://demo.com')
    ->miniprogram('小程序app_id', '小程序页面路径')
    ->data([
        'keyword1' => '关键词1',
        'keyword2' => '关键词2',
    ]);
}
```

### 小程序模板消息

[](#小程序模板消息)

```
public function via($notifiable)
{
    return [MiniProgramChannel::class];
}

public function toWechatMiniProgram($notifiable): MiniProgramTemplateMessage
{
    return (new MiniProgramTemplateMessage)
    ->to('接收用户的 openid')
    ->template('模板 ID')
    ->formId('formId 或者 prepay_id')
    ->page('小程序页面路径')
    ->data([
        'keyword1' => '关键词1',
        'keyword2' => '关键词2',
    ]);
}
```

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

2476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e97b8a6f67b09513e345a128d73a63898ae1ec9f6a6c77234c78b3f16d305d1?d=identicon)[zacksleo](/maintainers/zacksleo)

---

Top Contributors

[![zacksleo](https://avatars.githubusercontent.com/u/3369169?v=4)](https://github.com/zacksleo "zacksleo (9 commits)")

### Embed Badge

![Health badge](/badges/zacksleo-laravel-notification-wechat/health.svg)

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

###  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)[netflie/laravel-notification-whatsapp

Laravel notification driver for WhatsApp

176173.9k](/packages/netflie-laravel-notification-whatsapp)

PHPackages © 2026

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