PHP code example of ziming / laravel-domain-health-check
1. Go to this page and download the library: Download ziming/laravel-domain-health-check 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/ */
ziming / laravel-domain-health-check example snippets
// In your Laravel Health Service Provider register() method
use Spatie\Health\Facades\Health;
use Ziming\LaravelDomainHealthCheckHealthCheck\DomainCheck;
Health::checks([
DomainCheck::new()
->daily()
->domain('example.com') // by default, it uses your app.url config host if you did not call this method
->warnWhenDaysLeftToDomainExpiry(28)
->failWhenDaysLeftToDomainExpiry(7),
]);