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.
This check makes sure your application can connect to a database. If the default database connection does not work, this check will fail.
Here's how you can register the check.
use Spatie\Health\Facades\Health;
use Spatie\Health\Checks\Checks\DatabaseCheck;
Health::checks([
DatabaseCheck::new(),
]);
To check another database connection, call connectionName()
DatabaseCheck::new()->connectionName('another-connection-name'),
How can I help you explore Laravel packages today?