AuditStash Plugin Demo

Articles Add New Article

No articles found. Create one to see audit logging in action!

Audit Trail (Last 50 Changes)

No audit logs yet. Make changes to articles to see audit trail!

How AuditStash Works

This demo showcases the AuditStash plugin with TablePersister configuration.

Configuration:
  • Plugin loaded in config/plugins.php
  • TablePersister configured in config/app(_custom).php:
    'AuditStash' => [
        'persister' => \AuditStash\Persister\TablePersister::class,
    ],
  • Behavior added to SandboxArticlesTable:
    $this->addBehavior('AuditStash.AuditLog');
  • Audit logs stored in audit_logs table
What Gets Tracked:
  • Create: When a new article is added
  • Update: When an article is modified (tracks original and changed values)
  • Delete: When an article is removed
Demo Features:
  • Auto-Cleanup: Articles and audit logs older than 1 hour are automatically deleted on page load to keep the demo clean
  • Type Safety: Audit log types use PHP enums for better IDE support and type checking
Try It Out:
  1. Click "Add New Article" to create a new record
  2. Edit an article to see how changes are tracked
  3. Delete an article to see deletion logging
  4. View audit log details to see the full change history
  5. Use "Partial Revert" to restore selected fields from an update
  6. Use "Revert All Fields" to restore all previous values for updated records
  7. Use "Restore" to recover deleted records

Send your feedback or bugreport!