PHP code example of brightfish / health-checks
1. Go to this page and download the library: Download brightfish/health-checks library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
brightfish / health-checks example snippets
php artisan health:check
namespace App\Health\MyCustomCheck;
class MyCustomCheck extends \Brightfish\HealthChecks\Checks\AbstractCheck
{
public function run(): bool
{
return false;
}
public function getMessage(): string
{
return 'Error';
}
}
return [
'checks' => [
\App\Health\MyCustomCheck::class,
],
];
bash
php artisan vendor:publish --provider="Brightfish\HealthChecks\HealthServiceProvider" --tag="health-checks-config"