PHPackages                             zaengle/audits - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. zaengle/audits

ActiveLibrary[Database &amp; ORM](/categories/database)

zaengle/audits
==============

A package to manage model audits

v5.0.0(1y ago)27.5kMITPHPPHP ^8.1|^8.2|^8.3CI passing

Since Dec 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zaengle/audits)[ Packagist](https://packagist.org/packages/zaengle/audits)[ RSS](/packages/zaengle-audits/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (12)Used By (0)

[![Tests](https://github.com/zaengle/audits/workflows/Tests/badge.svg?branch=master)](https://github.com/zaengle/audits/workflows/Tests/badge.svg?branch=master)[![Latest Version on Packagist](https://camo.githubusercontent.com/26efbdd873cbbb82f538bc4a961423c05214ee165560989473348344bd4f4b86/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a61656e676c652f6175646974732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zaengle/audits)[![Total Downloads](https://camo.githubusercontent.com/450b71eec0afda1b9b69b3be570859e9cb2ebc58ef030b0f6259a3a5a8ae814b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a61656e676c652f6175646974732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zaengle/audits)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

[![audit header](audit-header.jpg)](audit-header.jpg)

Audits
======

[](#audits)

This packages records changes to a Laravel model and stores them in a json column on the model.

Usage
-----

[](#usage)

Use the `MakesAudits` trait on your model.

Next add a nullable json column to your model. By default the package will look for a column called `audits`. To override the auditable column, change the `$auditableColumn` property on your model.

```
protected $auditableColumn = 'audits';
```

Finally add a `json` cast for the auditable column.

```
protected $casts = [
    'audits' => 'json',
];
```

This is all you need to get started. The package will automatically record changes to the model and store them in the `audits` column.

If you ever need to save arbitrary data to the audit log you may do so by calling the `manualAudit` method.

```
$model = Model::find(1);

$model->manualAudit([
    'field' => 'value',
]);
```

Occasionally you may want to bypass writing to the audit log. In those cases you can override the `shouldTriggerAudit` function on your model like so:

```
// MyModel.php

public function shouldTriggerAudit(): bool
{
    return $someCondition ? true : false;
}
```

Attributions
------------

[](#attributions)

If you are looking for a more robust solution, this package is worth checking out: [Laravel Auditor](http://www.laravel-auditing.com/docs/9.0/auditor)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance48

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 75.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~161 days

Recently: every ~102 days

Total

11

Last Release

382d ago

Major Versions

v1.0.1 → v2.02021-01-12

v2.2.0 → v3.0.02023-02-15

v3.0.0 → v4.0.02024-03-18

v4.1.1 → v5.0.02025-05-01

PHP version history (7 changes)v1.0PHP ^7.2

v1.0.1PHP ^7.1

v2.0PHP ^7.3

v2.1PHP ^7.3|^8.0

v3.0.0PHP ^8.1

v4.0.0PHP ^8.1|^8.2

v5.0.0PHP ^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ffae66f8a3c9ea283079e6e74e520b39fd68a00dab4485aee819a69c0f3fa25?d=identicon)[jesseschutt](/maintainers/jesseschutt)

![](https://www.gravatar.com/avatar/d5562b4d7d0b994350c229be13a5a1e1f45e593abe55da7475cae551f2a9244e?d=identicon)[zaengle](/maintainers/zaengle)

---

Top Contributors

[![jesseschutt](https://avatars.githubusercontent.com/u/353047?v=4)](https://github.com/jesseschutt "jesseschutt (22 commits)")[![LoganTFox](https://avatars.githubusercontent.com/u/31284288?v=4)](https://github.com/LoganTFox "LoganTFox (7 commits)")

---

Tags

laravelAudit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zaengle-audits/health.svg)

```
[![Health](https://phpackages.com/badges/zaengle-audits/health.svg)](https://phpackages.com/packages/zaengle-audits)
```

###  Alternatives

[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[baril/bonsai

An implementation of the Closure Tables pattern for Eloquent.

3593.5k](/packages/baril-bonsai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
