1. Go to this page and download the library: Download webdna/auditor 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/ */
webdna / auditor example snippets
return [
'*' => [
// A nightly import is noise in the log.
'contexts' => ['cp', 'site', 'console'],
'redact' => ['password', 'newPassword', 'verificationCode', 'authKey', 'taxNumber'],
'retentionDays' => 180,
],
'dev' => [
'enabled' => false,
],
];
use webdna\auditor\events\DefineTrackedAttributesEvent;
use webdna\auditor\services\Differ;
use yii\base\Event;
Event::on(Differ::class, Differ::EVENT_DEFINE_TRACKED_ATTRIBUTES, function(DefineTrackedAttributesEvent $event) {
if ($event->elementType === \craft\elements\Entry::class) {
unset($event->attributes['postDate']);
}
});