-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get health information in code #131
Comments
I do something similar like this
|
You can probably do $generalHealthState = app('pragmarx.health')->checkResources();
// or
$databaseHealthy = app('pragmarx.health')->checkResource('database')->isHealthy(); |
Also: Artisan::command('database:health', function () {
app('pragmarx.health')->checkResource('database')->isHealthy()
? $this->info('database is healthy')
: $this->info('database is in trouble')
;
})->describe('Check database health'); |
Here's checking all resources to come to a final boolean since
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
is there a way to get the health information in code directly? If i want to show some checks in my application itself without using the panel it would be nice to have a function like "Health::getChecks()" to get informations about the health status.
The text was updated successfully, but these errors were encountered: