PHP code example of rob-lester-jr04 / laravel-health-expansion

1. Go to this page and download the library: Download rob-lester-jr04/laravel-health-expansion 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/ */

    

rob-lester-jr04 / laravel-health-expansion example snippets


// typically, in a service provider

use Spatie\Health\Facades\Health;
use Lester\Health\Checks\Checks\PaperTrailCheck;

Health::checks([
	PaperTrailCheck::new()
		->onSystem('my-system-1'),
]);

...highCount();
...lowCount();

// Change time frame (in minutes)
...lastMinutes();


	MAILGUN_SECRET=########


use Spatie\Health\Facades\Health;
use Lester\Health\Checks\Checks\MailgunDomainCheck;

Health::checks([
	// ...
	
	MailgunDomainCheck::new()
		->domain('mg.example.com'),
		
	// ...
]);