PHPackages                             firezihai/message-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. firezihai/message-notice

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

firezihai/message-notice
========================

消息通知组件(钉钉、微信消息通知)

v1.0.4(3mo ago)0340↓100%MITPHP

Since Dec 25Pushed 3mo ago1 watchersCompare

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

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

message-notice
==============

[](#message-notice)

功能
--

[](#功能)

- 用于发送应用异常、工作等通知
- 支持多平台,如钉钉、企业微信
- 支持自定义发送平台

安装
--

[](#安装)

```
composer require firezihai/message-notice -vvv

```

使用
--

[](#使用)

```
   $config = [
        'default' => [
            'drvier' => QyWechat::class,
            'app_name'=>'测试应用',
            'app_key' => '',
            'app_secret' => '',
            'agent_id' => '1000001',
        ],
    ];

    $factory =  MesasgeFactory::create($config['default']);
    $factory->send(['firezihai'], '测试内容');

```

配置多个消息通知平台
----------

[](#配置多个消息通知平台)

当你需要多个平台发送不同的消息通知时，可以配置多个平台

1. 配置

```

  'default' => [
        'drvier' => QyWechat::class,
        'app_name'=>'测试应用',
        'app_key' => '',
        'app_secret' => '',
        'agent_id' => '1000001',
    ],
    'dingtalk' => [
        'drvier' => Dingtalk::class,
        'app_name'=>'测试应用',
        'app_key' => '',
        'app_secret' => '',
        'agent_id' => '1000001',
    ],

```

2. 使用

```
    $factory =  MesasgeFactory::create($config['dingtalk']);
    $factory->send(['firezihai'], '测试内容');

```

自定义消息通知平台
---------

[](#自定义消息通知平台)

实现 `MessageInterface` 接口

1. 编写平台驱动类

```
class FeiShu implements MessageInterface
{

     /**
     * 发送消息.
     */
    public function send(array $userId, string $message)
    {

    }

}

```

2. 配置驱动类

配置新的驱动类

```

    'feishu' => [
        'drvier' => Dingtalk::class,
        'app_name'=>'测试应用',
        'app_key' => '',
        'app_secret' => '',
        'agent_id' => '1000001',
    ],

```

自定义 token 储存方式
--------------

[](#自定义-token-储存方式)

默认使用 文件 储存,如果你想使用数据库储存,可自定义储存驱动,只要实现 `AccessTokenInterface` 类即可.

1. 编写储存类

```

Db implements AccessTokenInterface
{
    private $config;
	public function __construct($config)
    {
        $this->config = $config;
    }
	// $app 配置文件中的app配置项
    public function getToken()
    {

    }

    public function refreshToken()
    {

    }
}

```

2. 配置

在配置中配置新的储存驱动类

```

    'default' => [
        // 其他配置
        ....
        'access_token' => DB::class,
         // 其他配置
    ],

```

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance87

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Every ~378 days

Total

4

Last Release

96d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95ed582c23f06f22eb888b5c058dcf71433576112d21e7fc864cd26ef0644705?d=identicon)[firezihai](/maintainers/firezihai)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/firezihai-message-notice/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)

PHPackages © 2026

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