skygdi/slack

Shared Slack integration for Laravel

Maintainers

Package info

github.com/skygdi/laravel-shared-slack

Language:Blade

pkg:composer/skygdi/slack

Statistics

Installs: 95

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.3 2026-03-30 21:50 UTC

This package is auto-updated.

Last update: 2026-03-30 22:27:11 UTC


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=