定制 dealnews/slack 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dealnews/slack

最新稳定版本:2.0.1

Composer 安装命令:

composer require dealnews/slack

包简介

Slack PHP Library

README 文档

README

A library for sending simple messages to Slack from PHP. We have used this internally for years. The other options out there seem to be out of date and no longer supported.

Send a Message

use DealNews\Slack\Message;

// Send a simple text message
$message = new Message($hook_url);
$message->send("channel", "message");

// Send a formatted message
$message->send(
    "channel",
    [
        'fallback' => 'Some fallback text for older clients',
        'color'    => '#dadada',
        'fields'   => [
            [
                'title' => 'Test',
                'value' => 'testing',
                'short' => true,
            ],
        ],
        'pretext'     => 'pretext',
        'author_name' => 'author',
        'author_link' => 'http://www.example.com/',
        'author_icon' => 'http://www.example.com/example.jpg',
        'title'       => 'title',
        'title_link'  => 'http://www.example.com/',
        'text'        => 'text',
        'image_url'   => 'http://www.example.com/example.jpg',
        'thumb_url'   => 'http://www.example.com/example.jpg',
    ]
);

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2025-11-09