1. Go to this page and download the library: Download bowero/laravel-healthchecks 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/ */
bowero / laravel-healthchecks example snippets
return [
/*
* The URL endpoint of healthchecks.io
*/
'url' => 'https://hc-ping.com/',
/*
* Your registered jobs
*/
'jobs' => [
'my-first-check' => [
'uuid' => 'c2c0be0a-94fa-4128-aa8a-cd55889cdb29',
],
],
];
use Bowero\Healthchecks\Facades\Healthchecks;
/*
* Create a job
* (the job is registered in healthchecks.php)
*/
$job = Healthchecks::job('my-first-check');
/*
* Create a job based on the uuid
*/
$job = Healthchecks::uuid('c2c0be0a-94fa-4128-aa8a-cd55889cdb29');
/*
* Mark the job as started
*/
$job->start();
/*
* Mark the job as succesful
*/
$job->success();
/*
* Mark the job as failed
*/
$job->failure();
/*
* Mark the job as exited with a status code
*/
$job->exitWithStatus(1);