1. Go to this page and download the library: Download pulsehub/laravel 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/ */
use PulseHub\Laravel\Events\ReportSent;
use PulseHub\Laravel\Events\ReportFailed;
Event::listen(ReportSent::class, fn ($e) => /* ... */);
Event::listen(ReportFailed::class, function ($e) {
if ($e->category() === 'auth_invalid') {
// page the on-call: PulseHub key is broken
}
});