Skip to content
Viames Marino edited this page Feb 23, 2026 · 1 revision

Pair framework: Audit

Pair\Models\Audit stores audit trail events for security-sensitive operations.

Main behavior

Lifecycle hooks:

  • _init() defines audit schema and validation
  • beforeCreate() enriches event metadata before insert

Implementation example

$audit = new \Pair\Models\Audit();
$audit->action = 'acl.created';
$audit->description = 'ACL rule added to group 4';
$audit->store();

Notes

  • Frequently written by model hooks (for example ACL/group changes).

See also: Acl, Group, ErrorLog.

Clone this wiki locally