Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Discord Notifications

Discord Notifications Laravel Package

tomatophp/discord-notifications

Send Discord notifications from your Laravel app with tomatophp/discord-notifications. This package offers a simple integration for delivering messages to Discord channels via webhooks, making it easy to add real-time alerts and updates to your projects.

View on GitHub
Deep Wiki
Context7

Laravel notification driver for Discord.

Frequently asked questions about Discord Notifications
How do I install tomatophp/discord-notifications in a Laravel app?
Install it with composer require tomatophp/discord-notifications. Laravel's package auto-discovery registers the service provider, so no manual provider entry is usually needed. Publish the package config with php artisan vendor:publish and add your DISCORD_WEBHOOK_URL to the .env file.
Which Laravel and PHP versions does tomatophp/discord-notifications support?
The last tagged release is from March 2024, which predates Laravel 12 and much of the Laravel 11 patch cycle, so do not assume current framework support. Open the package composer.json and check the illuminate/support and php constraints against your application matrix before committing. If the constraint is too tight, Composer will either block the install or push you toward --ignore-platform-reqs, which is a red flag for production.
How do I configure the Discord webhook URL for this Laravel notification channel?
The webhook URL lives in your environment as DISCORD_WEBHOOK_URL and is read through configuration. Confirm whether the package pulls it from config/services.php or from its own published config file, because that determines whether php artisan config:cache is safe in production. A channel that calls env() directly at runtime will break once config is cached, so verify this before deploying.
How do I send a Discord notification from a Laravel notification class?
Create a standard notification class and add the package's channel key, typically 'discord', to the array returned by via(). Implement the payload method the channel expects so it can translate your notification into a Discord webhook POST. Then trigger it like any other notification with $user->notify(new YourNotification()) or the Notification facade.
Does tomatophp/discord-notifications work with queues and ShouldQueue?
Yes in principle, because it plugs into Laravel's notification channel contract, so adding ShouldQueue to your notification class routes delivery through your queue worker. The important detail to verify is failure semantics: the channel's send method should throw on non-2xx responses so the job is retried or marked failed instead of silently dropping the message. Test this against a deliberately broken webhook URL.
Can I send Discord embeds and message components, or only plain content?
The package is a thin adapter of roughly 100 to 200 lines, which suggests it focuses on a simple content payload rather than rich Discord features. If you need embeds, buttons, or components, inspect the payload builder in the source before adopting. For anything beyond basic messages, either extend the channel yourself or use a channel that documents embeds explicitly.
Does the package handle Discord rate limits and 429 responses?
There is no evidence in the package signals that rate-limit handling is implemented, so assume fire-and-forget behavior until you read the source. Discord returns X-RateLimit headers and a Retry-After value on 429 responses, and a channel that ignores them will drop messages during bursts. If you send to busy channels, add backoff at the job level or wrap the call in your own retry logic.
Is tomatophp/discord-notifications safe to use in production?
The engineering risk is low but the supply-chain risk is real: zero stars, zero dependents, a single maintainer, and no issue backlog to mine for known failure modes. The mitigating factor is that the surface area is tiny, so the package behaves more like a reference implementation than a dependency you rent. Many teams wrap it behind an internal notifier contract, or simply reimplement the webhook POST in about a day and drop the dependency.
What are the alternatives to tomatophp/discord-notifications?
The commonly named community option is laravel-notification-channels/discord, which is worth standardizing on as a fallback so a swap is a config change rather than a refactor. You can also skip packages entirely and call Http::post() against the Discord webhook URL from a small custom channel class. Given the low complexity, an in-house channel gives you full control over retries, rate limits, and embed support.
Can I send on-demand Discord notifications without a notifiable model?
Yes, the channel is designed to compose with Laravel's Notification::route() on-demand notifications, so you can target a webhook without attaching the channel to a User model. Verify that the channel resolves the route value correctly, since not every third-party channel implements routeNotificationFor properly. For tests, use Notification::fake() and assert the notification was sent rather than hitting a live Discord webhook.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections