skygdi/slack 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

skygdi/slack

最新稳定版本:v1.0.3

Composer 安装命令:

composer require skygdi/slack

包简介

Shared Slack integration for Laravel

README 文档

README

A simple Laravel package for sending Slack notifications and viewing them in a dashboard.

Installation

composer require skygdi/slack

Features

  • Send Slack messages from Laravel
  • Log informational messages
  • Use a default Slack channel from .env
  • Simple dashboard route for viewing package output

Environment Variables

Add these values to your .env file:

SLACK_BOT_TOKEN=xoxb-your-token
SLACK_DEFAULT_CHANNEL=sanmar
SLACK_ROLE=Worker2

Variables

  • SLACK_BOT_TOKEN Your Slack bot token.

  • SLACK_DEFAULT_CHANNEL The default Slack channel name to send messages to.

  • SLACK_ROLE The worker or role name that will appear in messages.

Usage

Example

use Skygdi\Slack\SlackGate;

SlackGate::info('SanMar DIP import raw variants finished', [
    'total_rows' => $totalRows,
]);

Example Output

This sends an info message to Slack with extra context data.

Dashboard

Visit:

/slack_dashboard

to access the dashboard.

Basic Example

SlackGate::info('Import finished', [
    'total_rows' => 1200,
    'source' => 'SanMar',
]);

Suggested Use Cases

  • import completed
  • import failed
  • background job status
  • webhook activity
  • sync finished
  • warning or error reporting

Notes

  • Make sure your Slack bot has permission to post in the target channel.
  • Make sure the channel exists and the bot has been added to it.
  • Keep your Slack bot token private and never commit it to source control.

Security

Do not commit real .env values to GitHub or any public repository.

Use this in your .env.example instead:

SLACK_BOT_TOKEN=
SLACK_DEFAULT_CHANNEL=
SLACK_ROLE=

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固