spatie/laravel-health
Monitor your Laravel app’s health by registering checks (disk space, etc.) with warning/fail thresholds. Get notified via mail or Slack when checks degrade, and extend with custom checks for proactive alerting.
When a check starts returning warnings or failures, you can get notified via mail.
To do this you must set the CheckFailedNotification to use the mail channel. This can be done in the config file.
// in config/health.php
'notifications' => [
Spatie\Health\Notifications\CheckFailedNotification::class => ['mail'],
],
In the mail key of the health config file, you can configure the to/from of the sent mails.
// in config/health.php
'mail' => [
'to' => 'your@example.com',
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
],
Here's how the mail will look like (rendered via Ray).

How can I help you explore Laravel packages today?