spatie/laravel-discord-alerts
Quickly send alerts to Discord from your Laravel app using a simple facade. Messages are dispatched via a queued job, so your app keeps running even if Discord is down. Just set a webhook URL and start notifying yourself of noteworthy events.
DiscordAlert::message(...)), so the build-vs-buy answer defaults to "buy/adopt" instead of spending engineering time on webhook plumbing, payload shaping, and job wiring.to() selector plus multiple named webhooks in config means one integration can address separate audiences (e.g., marketing, engineering, oncall) — a product decision about who hears what that costs config, not code.attach/attachData), markdown, emoji, TTS, and per-message username/avatar are available on day one, so decisions about report formatting or branded notifications don't require new backlog items.delayMinutes/delayHours supports digest-style and reminder-style product patterns (batch a morning summary instead of firing an alert per event) without a scheduler of your own.Adopt when most of these hold:
DISCORD_ALERT_WEBHOOK and a config publish.Notifier interface, so a later move to Slack/Teams/email is a swap and not a refactor.Look elsewhere when:
attachData() discipline or a different pipeline.Additional diligence flags worth logging: Dependents: 0 and a modest star count mean little external validation of edge cases — pin the version, wrap the facade, and treat the public API as a convenience rather than a contract.
For executives (30 seconds): This is a free, MIT-licensed Spatie package that lets our Laravel app post messages to Discord in a single line of code. It removes a recurring "we should notify the team when X happens" backlog item, at effectively zero cost and zero vendor lock-in — Discord webhooks are a standard platform feature, and the package is a thin wrapper we can remove in an hour if we change direction. Risk is low and the decision is reversible.
For engineering leads: It's a facade over Discord webhook HTTP calls with the send offloaded to a queued job, so alerts can never take down a user-facing request. We get embeds, attachments, markdown, multiple named webhooks, custom or per-message usernames/avatars, TTS, and delayed delivery out of the box. We control the queue connection, queue name, and can subclass the job for retries and timeouts — no forking. Maintenance posture is good: Spatie-maintained, active releases, MIT, PHPStan and test CI. The one caveat is ecosystem maturity — no downstream dependents — so we pin the version and route all calls through a single internal Notifier wrapper. That keeps a future swap to Slack, Teams, or Laravel's native notification channels a contained change rather than a codebase-wide grep.
For the team using it: One line to send: DiscordAlert::message('...'). Separate webhooks per audience, embeds for structured reports, attachData() for generated files, delayMinutes() for batching. Keep messages human-readable and avoid putting secrets or customer PII in a channel; assume the message is permanent and visible to everyone in that channel.
How can I help you explore Laravel packages today?