Alpha

Laravel Audit to prove it!

SHA-256 cryptographic hash chain on your Eloquent models. Know who changed what, when — and prove it.

app/Models/Order.php
use GrayMatter\AuditChain\Concerns\HasAuditTrail;
use GrayMatter\AuditChain\Contracts\Auditable;

class Order extends Model implements Auditable
{
    use HasAuditTrail;
}

// Every change is cryptographically chained
$order = Order::create(['status' => 'pending']);
$order->update(['status' => 'shipped']);

Install in seconds

From composer install to audit trail in three steps.

Add a tamper-evident cryptographic chain to your existing Eloquent models.

1

Install the package

composer require graymatter/laravel-audit-chain

2

Publish & migrate

php artisan vendor:publish && php artisan migrate

3

Add the trait

use HasAuditTrail;

Built for security

Every entry is cryptographically linked to the one before it.

If someone modifies, deletes or inserts an entry, the chain breaks and the audit:verify command catches it immediately.

Tamper-evident

SHA-256 hash chain — any tampering is instantly detectable. Eloquent logs are write-protected.

Full traceability

Every change, every user, every timestamp — searchable and exportable.

Verification

Artisan command + programmatic API. Automated alerts via email and webhooks.

Use cases

Real scenarios, concrete answers.

Someone deleted a record. Who? When? Can you prove it?

Every change is chained. Run audit:verify.

The regulator requests a full audit log.

Export the complete chain — verifiable and tamper-evident.

A developer bypassed Eloquent to modify data directly.

The chain breaks. audit:verify catches it instantly.

Features

Security, traceability, and integrity verification for your models.

use GrayMatter\AuditChain\Concerns\HasActivityLog;

class Post extends Model implements Auditable
{
    use HasActivityLog;
}

// hash: null, prev_hash: null
// Simple event logging
use GrayMatter\AuditChain\Concerns\HasAuditTrail;

class Order extends Model implements Auditable
{
    use HasAuditTrail;
}

// hash: SHA-256, prev_hash: linked
// Tamper-evident and verifiable

Two modes, one package

Choose the right security level for each model.

HasActivityLog for lightweight logging without hashing. HasAuditTrail for the full cryptographic chain. Both share the same API, table, and ecosystem.

Coming soon

AuditChain Monitoring Pro

Monitor your data integrity in real time. Detect anomalies before they become incidents.

Pro

Real-time Dashboard

Visualize audit chain status, event volumes, and trends at a glance.

Pro

Anomaly Detection

Smart alerts on unusual patterns: mass deletions, off-hours changes, suspicious access.

Pro

Scheduled Verification

Automated chain integrity checks with reports and history.

Pro

Compliance Reports

Auditor-ready PDF/CSV reports. NIS2, SOC2, ISO 27001.

Pro

User Activity Timeline

View all user actions on an interactive timeline.

Pro

Data Diff Viewer

Visually compare before/after changes on every audit entry.

Pro

Interested in AuditChain Monitoring Pro?

Monitoring, external anchoring, compliance reports and more. Get notified at launch.

Thanks! You'll be notified at launch.

Something went wrong. Please try again.

No spam. Launch notification only.

Ready to get started?

Add immutable audit trails to your Laravel application in minutes.

terminal
$ composer require graymatter/laravel-audit-chain

PHP 8.2+ · Laravel 11 & 12 · MIT License · Alpha