PHP code example of admn / admn-php
1. Go to this page and download the library: Download admn/admn-php 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/ */
admn / admn-php example snippets
use Admn\Admn\AuditLogger;
use Admn\Admn\Actor;
// Set API Token Globally
AuditLogger::setCredentials($token, $secret);
// Create Actor Identifier Object
$actor = (new Actor())->setIdentifier(email, '[email protected]')->setDisplay('John Doe');
// Send Action
return AuditLogger::make($actor)
)->setAction('Updated a user record')
->setTags(['user:123','user-update'])
->setContext([
'key' => 'email',
'original_value' => '[email protected]',
'updated_value' => '[email protected]',
])
->save();
bash
composer