PHPackages                             fanly/msgrobot - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fanly/msgrobot

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fanly/msgrobot
==============

message robot to dingding or others

0.0.1(8y ago)2161MITPHP

Since Feb 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/fanly/msgrobot)[ Packagist](https://packagist.org/packages/fanly/msgrobot)[ RSS](/packages/fanly-msgrobot/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

我们选择利用 Lumen 项目试试，安装插件

[![](https://camo.githubusercontent.com/b3a202ba71b57a70fb9f32c184f258587a3814b7c8a51c0ad6db9c420c448e3d/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313936323230303933302e6a7067)](https://camo.githubusercontent.com/b3a202ba71b57a70fb9f32c184f258587a3814b7c8a51c0ad6db9c420c448e3d/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313936323230303933302e6a7067)

在 bootstrap/app.php 引入注册插件 ServiceProvider：

```
$app->register(Fanly\Msgrobot\FanlyMsgrobotServiceProvider::class);

```

我们写一个 test，试试效果，先创建独立跳转 ActionCard 类型消息，然后给已创建的机器人对应的「access\_token」钉钉群推送此消息

```
// text
        $text = new Text('hello fanly/msgrobot package');
        Msgrobot::accessToken('cb36a3c3cab1242b94516d026a02d909f1611ec048d89c93cb3e1132f08b4e')
            ->message($text)
            ->send();

        // link
        $link = new Link([
            'text' => 'link text',
            'title' => 'link title',
            'picUrl' => 'http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg',
            'messageUrl' => 'http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg'
        ]);
        Msgrobot::accessToken('cb36a3c3cab1242b94516d026a02d909f1611ec048d89c93cb3e1132f08b4e')
            ->message($link)
            ->send();

        // markdown
        $md = new Markdown([
            'title' => 'link text',
            'text' => "#### 杭州天气 @156xxxx8827\n > 9度，西北风1级，空气良89，相对温度73%\n\n> ![screenshot](http://image.jpg)\n> ###### 10点20分发布 [天气](http://www.thinkpage.cn/) \n"
        ]);

        Msgrobot::accessToken('cb36a3c3cab1242b94516d026a02d909f1611ec048d89c93cb3e1132f08b4e')
            ->message($md)
            ->send();

        // Single ActionCard
        $sac = new SingleActionCard([
            'title' => 'link title',
            'text' => '![screenshot](@lADOpwk3K80C0M0FoA)
 ### 乔布斯 20 年前想打造的苹果咖啡厅
 Apple Store 的设计正从原来满满的科技感走向生活化，而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划',
            'hideAvatar' => 0,
            'btnOrientation' => 0,
            'singleTitle' => '阅读原文',
            'singleURL' => 'http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg'
        ]);

        Msgrobot::accessToken('cb36a3c3cab1242b94516d026a02d909f1611ec048d89c93cb3e1132f08b4e')
            ->message($sac)
            ->send();

        // More ActionCard
        $btns = [
            new ActionCardBtn([
                'title' => '内容不错',
                'actionURL' => 'http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg'
            ]),
            new ActionCardBtn([
                'title' => '不感兴趣',
                'actionURL' => 'http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg'
            ])
        ];

        $mac = new MoreActionCard([
            'title' => 'link title',
            'text' => '![screenshot](@lADOpwk3K80C0M0FoA)
 ### 乔布斯 20 年前想打造的苹果咖啡厅
 Apple Store 的设计正从原来满满的科技感走向生活化，而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划',
            'hideAvatar' => 0,
            'btnOrientation' => 0,
            'btns' => $btns
        ]);

        Msgrobot::accessToken('cb36a3c3cab1242b94516d026a02d909f1611ec048d89c93cb3e1132f08b4e')
            ->message($mac)
            ->send();

        // FeedCard
        $links = [
            new FeedCardLink([
                'title' => "时代的火车向前开",
                "messageURL" => "https://mp.weixin.qq.com/s?__biz=MzA4NjMwMTA2Ng==&mid=2650316842&idx=1&sn=60da3ea2b29f1dcc43a7c8e4a7c97a16&scene=2&srcid=09189AnRJEdIiWVaKltFzNTw&from=timeline&isappinstalled=0&key=&ascene=2&uin=&devicetype=android-23&version=26031933&nettype=WIFI",
                "picURL" => "http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg"
            ]),
            new FeedCardLink([
                'title' => "时代的火车向前开",
                "messageURL" => "https://mp.weixin.qq.com/s?__biz=MzA4NjMwMTA2Ng==&mid=2650316842&idx=1&sn=60da3ea2b29f1dcc43a7c8e4a7c97a16&scene=2&srcid=09189AnRJEdIiWVaKltFzNTw&from=timeline&isappinstalled=0&key=&ascene=2&uin=&devicetype=android-23&version=26031933&nettype=WIFI",
                "picURL" => "http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg"
            ])
        ];

        $fc = new FeedCard($links);

        Msgrobot::accessToken('cb36a3c3cab1242b94516d026a02d909f1611ec048d89c93cb3e1132f08b4e')
            ->message($fc)
            ->send();
```

[![](https://camo.githubusercontent.com/ad233f2c16e483706d4e1286ec8916d5028ba869d13232aacd299f226f7c1a20/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937323739323739302e6a7067)](https://camo.githubusercontent.com/ad233f2c16e483706d4e1286ec8916d5028ba869d13232aacd299f226f7c1a20/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937323739323739302e6a7067)

[![](https://camo.githubusercontent.com/5218084510a982636804e5975888cc83cf39a6abd1f2fc4046240a8e04a178cc/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937333138393634362e6a7067)](https://camo.githubusercontent.com/5218084510a982636804e5975888cc83cf39a6abd1f2fc4046240a8e04a178cc/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937333138393634362e6a7067)

[![](https://camo.githubusercontent.com/0911d78f29c2dd69a5de41771efd082b106cec6ad11f63768c5e56ff01d5a498/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937333438323731312e6a7067)](https://camo.githubusercontent.com/0911d78f29c2dd69a5de41771efd082b106cec6ad11f63768c5e56ff01d5a498/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937333438323731312e6a7067)

[![](https://camo.githubusercontent.com/130ba99efeb0c55716cf3098a76a20217d9dff09946a56c3fa70925ba86f406e/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937333735313039382e6a7067)](https://camo.githubusercontent.com/130ba99efeb0c55716cf3098a76a20217d9dff09946a56c3fa70925ba86f406e/687474703a2f2f6f773230673474676a2e626b742e636c6f7564646e2e636f6d2f323031382d30322d32312d31353139313937333735313039382e6a7067)

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

3052d ago

### Community

Maintainers

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

---

Top Contributors

[![fanly](https://avatars.githubusercontent.com/u/1321825?v=4)](https://github.com/fanly "fanly (1 commits)")

### Embed Badge

![Health badge](/badges/fanly-msgrobot/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[nfse-nacional/nfse-php

This is my package nfse

1533.1k](/packages/nfse-nacional-nfse-php)

PHPackages © 2026

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