Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.47 KB

README.md

File metadata and controls

50 lines (39 loc) · 1.47 KB

php-wechat-work-robot

Easy to send WechatWork robot message

Usage

composer require ritaswc/wechat-work-robot

Send Message

$key = 'a45bxxxx-xxxx-xxxx-xxxx-fbf0a09cxxxx';
$robot = new \Ritaswc\WechatWorkRobot\WechatWorkRobot($key);

$robot->sendText('PHP is the best language in the world!', ['huixinchen', '@all']);
$robot->sendText('PHP is the best language in the world!', [], ['199****1322', '@all']);

$robot->sendImage('wechatpay.png');
$robot->sendImage('https://blogoss.yinghualuo.cn/blog/2019/05/wechatpay.png');

$robot->sendMarkDown("## 欢迎使用支付宝赞助
## 欢迎使用微信赞助");

$robot->sendNews([
    [
        'title'       => 'Charles的小星球',
        'description' => '一个PHP码农的自述',
        'url'         => 'https://blog.yinghualuo.cn',
        'picurl'      => 'https://blog.yinghualuo.cn/wp-content/themes/twentyseventeen/assets/images/header.jpg',
    ],
    [
        'title'       => 'Charles的小星球1',
        'description' => '一个PHP码农的自述1',
        'url'         => 'https://blog.yinghualuo.cn',
        'picurl'      => 'https://blog.yinghualuo.cn/wp-content/themes/twentyseventeen/assets/images/header.jpg',
    ]
]);

Author Blog

Charles的小星球

Dingtalk Document

如何配置群机器人?

License

MIT

Sponsor

QrCode