← Back to Packages

Package

Laravel Slack

PHP Laravel

Stateless Slack incoming-webhook client for Laravel with Block Kit message transport and webhook-URL validation.

Overview

Slack incoming webhooks are self-contained bearer URLs: there is no OAuth flow, no bot token, and no app-level credential to configure. SlackClient::send() posts Block Kit blocks plus a fallback text to a webhook URL, SlackWebhookUrl::validate() checks a pasted URL before you store it, and a dedicated SlackWebhookRevoked exception fires on Slack's 404/410 so you can mark a dead credential instead of retrying it forever.

Installation

composer require labrodev/laravel-slack

Tips

  • Validate a pasted webhook URL with SlackWebhookUrl::validate() before storing it.
  • Store the webhook URL encrypted; it is the bearer secret, treat it like a password.
  • Catch SlackWebhookRevoked on 404/410 responses and mark the stored credential dead.
View on GitHub →