PHPackages                             listen/dingtalk - 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. listen/dingtalk

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

listen/dingtalk
===============

Dingtalk Package For Laravel5 Only

1.0.5(7y ago)2841MITPHPPHP &gt;=7.0.0

Since Jan 29Pushed 7y agoCompare

[ Source](https://github.com/listen-rain/dingtalk)[ Packagist](https://packagist.org/packages/listen/dingtalk)[ RSS](/packages/listen-dingtalk/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

dingtalk 是基于 laravel5.5 开发的钉钉机器人扩展包
===================================

[](#dingtalk-是基于-laravel55-开发的钉钉机器人扩展包)

> 仅支持 Laravel 5 框架

[![Latest Stable Version](https://camo.githubusercontent.com/f1698abaa4abf5c908955f9eaa43f5db362a4b3984cb90a71fa637e32ccad878/68747470733a2f2f706f7365722e707567782e6f72672f6c697374656e2f64696e6774616c6b2f762f737461626c65)](https://packagist.org/packages/listen/dingtalk)[![Total Downloads](https://camo.githubusercontent.com/b79d461a688ae171644505423d376d9b7db19910a35faa219989bf22706b267b/68747470733a2f2f706f7365722e707567782e6f72672f6c697374656e2f64696e6774616c6b2f646f776e6c6f616473)](https://packagist.org/packages/listen/dingtalk)[![Latest Unstable Version](https://camo.githubusercontent.com/ebe9ef9994673a51f771f54c8e9410b10c6f0dd26648ec2a32697bbad9ef4e6a/68747470733a2f2f706f7365722e707567782e6f72672f6c697374656e2f64696e6774616c6b2f762f756e737461626c65)](https://packagist.org/packages/listen/dingtalk)[![License](https://camo.githubusercontent.com/6af827658142c996e4a32bda045fc492500bbe3379d9c64c7825e2d0376dbabd/68747470733a2f2f706f7365722e707567782e6f72672f6c697374656e2f64696e6774616c6b2f6c6963656e7365)](https://packagist.org/packages/listen/dingtalk)[![Monthly Downloads](https://camo.githubusercontent.com/f4ab8ec47e1f3bbb1a04ab63c27f5ecc3bc5740cd81cb1ff81e430f1e5dace58/68747470733a2f2f706f7365722e707567782e6f72672f6c697374656e2f64696e6774616c6b2f642f6d6f6e74686c79)](https://packagist.org/packages/listen/dingtalk)[![Daily Downloads](https://camo.githubusercontent.com/1b9d73c9886d0ba1891edeb8e4cec89e6c739d527f8bb67d647ae207517ed054/68747470733a2f2f706f7365722e707567782e6f72672f6c697374656e2f64696e6774616c6b2f642f6461696c79)](https://packagist.org/packages/listen/dingtalk)[![composer.lock](https://camo.githubusercontent.com/788bbcb0ff7cc509702f1f9b8a81404c8c2d3b273156deb5d08eb1eb5b2418ec/68747470733a2f2f706f7365722e707567782e6f72672f6c697374656e2f64696e6774616c6b2f636f6d706f7365726c6f636b)](https://packagist.org/packages/listen/dingtalk)

```
当前自定义机器人支持
文本（text）、链接（link）、markdown（markdown）三种消息类型
大家可以根据自己的使用场景选择合适的消息类型，达到最好的展示样式

```

安装方法
====

[](#安装方法)

### 1、安装

[](#1安装)

```
composer require listen/dingtalk

```

### 2、配置app.php

[](#2配置appphp)

在config/app.php 'providers' 中添加

```
\Listen\DingTalk\Providers\DingTalkServiceProvider::class,

```

在config/app.php 'aliases' 中添加

```
'DingTalk' => Listen\DingTalk\Facades\DingTalk::class,

```

### 3、生成配置文件 config/dingtalk.php

[](#3生成配置文件-configdingtalkphp)

```
php artisan vendor:publish --provider='Listen\DingTalk\Providers\DingTalkServiceProvider'

```

### 配置

[](#配置)

```
return [
    // 配置 domain 后，token 课为空
    // .env 示例 DING_TOKEN=2d5exxxx3fd30b863bf53150b82caeb2d5eae1c32a6378d375b9875a1dbadxxx
    'token' => env('DING_TOKEN', ''),  // token

    // 配置token后，domain 可以为空
    // .env 配置示例：DING_DOMAIN=https://oapi.dingtalk.com/robot/send?access_token=2d5exxxx3fd30b863bf53150b82caeb2d5eae1c32a6378d375b9875a1dbadxxx
    'domain' => env('DING_DOMAIN', ''),

    'atMobiles' => [] // @ 的人员
];

```

使用
==

[](#使用)

### 实例化

[](#实例化)

```
$message = app('message')
或
$message = app(Listen\DingTalk\Message::class)

$dingtalk = app('dingtalk')
或
$dingtalk = app(Listen\DingTalk\DingTalk::class)

```

### 实现Text发送

[](#实现text发送)

```
$message = app('message')->text("laravel error");
app('dingtalk')->send($message);

```

### 实现Link发送

[](#实现link发送)

```
$DingTalk = new DingTalk();
$message = new Message();
$title = '测试link类型title';
$text = '测试link类型text';
$messageUrl = 'https://www.baidu.com/';
$picUrl = '';
$data = $message->link($title, $text, $messageUrl, $picUrl);
$DingTalk->send($data);

```

### 实现Markdown发送

[](#实现markdown发送)

```
$message = app('message')->markdown('test', "laravel error");
app('dingtalk')->send($message);

```

### 使用帮助函数

[](#使用帮助函数)

```
sendByDingtalk('test message', 'test');

```

### 联系

[](#联系)

邮箱：

微信：w15275049388

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.3% 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 ~5 days

Total

5

Last Release

2636d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a57f985c4d59480c0f310f92e51fd2bbc5a211b6a5f8a9f011720d0800ee854?d=identicon)[listen-rain](/maintainers/listen-rain)

---

Top Contributors

[![listen-rain](https://avatars.githubusercontent.com/u/41713191?v=4)](https://github.com/listen-rain "listen-rain (9 commits)")[![WXiangQian](https://avatars.githubusercontent.com/u/33483107?v=4)](https://github.com/WXiangQian "WXiangQian (5 commits)")

### Embed Badge

![Health badge](/badges/listen-dingtalk/health.svg)

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

###  Alternatives

[giggsey/locale

Locale functions required by libphonenumber-for-php

635141.2M14](/packages/giggsey-locale)[jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

5193.6M12](/packages/jeroendesloovere-vcard)[coderflex/laravel-ticket

Laravel Ticket System, to help you manage your tickets eaisly

43178.0k1](/packages/coderflex-laravel-ticket)[prestashop/ps_shoppingcart

PrestaShop module ps\_shoppingcart

117.6M2](/packages/prestashop-ps-shoppingcart)[prestashop/ps_crossselling

PrestaShop - Cross selling

117.3M2](/packages/prestashop-ps-crossselling)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)

PHPackages © 2026

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