donkooijman / discord-for-laravel-health
Discord webhook notification channel for spatie/laravel-health
Fund package maintenance!
donkooijman
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/donkooijman/discord-for-laravel-health
Requires
- php: ^8.2
- illuminate/contracts: ^11.0||^12.0
- spatie/laravel-health: ^1.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
README
Send spatie/laravel-health check failure notifications to a Discord channel via webhooks. Each failed check is formatted as a color-coded embed (green for OK, yellow for warning, red for failed/crashed).
Requirements
This package requires spatie/laravel-health to be installed and configured in your application. If you haven't set it up yet, follow their installation instructions first.
Installation
Install the package via Composer:
composer require donkooijman/discord-for-laravel-health
Configuration
You'll need a Discord webhook URL. You can learn how to create one in the Discord API docs.
Add your Discord webhook URL to your .env file:
HEALTH_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your/webhook-url
Optionally, publish the config file:
php artisan vendor:publish --tag="discord-for-laravel-health-config"
Then configure spatie/laravel-health to use the package's notifiable and notification classes in config/health.php:
'notifications' => [ // ... 'notifiable' => \DonKooijman\DiscordForLaravelHealth\Notifications\HealthNotifiable::class, 'notifications' => [ \DonKooijman\DiscordForLaravelHealth\Notifications\HealthCheckFailedNotification::class => ['discord'], ], ],
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.