Overview
revolution/laravel-notification-discord-webhook is a Laravel notification channel that delivers notifications to Discord using Webhooks. Discord’s official Bot API requires maintaining a persistent WebSocket connection, which adds complexity to your setup. With a Webhook, you only need a URL — no Bot token, no gateway, no background process. If your goal is simply to notify a Discord channel about application events, a Webhook is the right tool for the job.This package requires PHP 8.3 or higher and Laravel 12.0 or higher.
Installation
Configuration
Get a Webhook URL from Discord
Create a Webhook URL from your Discord server’s Settings → Integrations → Webhooks. See the Discord official guide for detailed instructions.config/services.php
.env
Basic usage
Create a Notification class
Implement thetoDiscordWebhook() method and return DiscordChannel::class from via().
Sending notifications
On-Demand notification
UseNotification::route() to send a notification without tying it to a specific notifiable model.
Notification from a User model
To support per-user Webhook URLs, definerouteNotificationForDiscordWebhook() on your model.
Message types
Text message
The simplest way to send a message.Embed message
UseDiscordEmbed to create a rich embed with a title, description, and URL.
File attachment
UseDiscordAttachment to attach a file. Both content (raw file bytes) and filename are required.
Referencing attachments in an embed
You can reference an attached file inside an embed’simage or thumbnail using the attachment://filename syntax.
Send any payload
Use->with() to pass arbitrary parameters directly to the Discord Webhook API.
Summary
A Discord Bot is powerful but overkill when you only need to send notifications. With this package, you can integrate Discord notifications into the standard Laravel notification system in minutes — no Bot token, no gateway connection, just a Webhook URL and a Notification class.For the latest information, refer to the GitHub repository.