PHP code example of allclearly / monitor

1. Go to this page and download the library: Download allclearly/monitor 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/ */

    

allclearly / monitor example snippets


use AllClearly\Monitor\Client;

app(Client::class)->roleChanged(['user' => $user->email, 'meta' => ['role' => 'admin']]);

use AllClearly\Monitor\Client;
use AllClearly\Monitor\RequestInfo;

$monitor = new Client(); // อ่าน ALLCLEARLY_MONITOR_TOKEN, ส่งอัตโนมัติตอนจบ script

if (! password_verify($password, $hash)) {
    $monitor->loginFailed(RequestInfo::fromGlobals() + ['user' => $email, 'status' => 401]);
}