Skip to content

zaengle/audits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests Latest Version on Packagist Total Downloads MIT Licensed

audit header

Audits

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

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',
];

Attributions

If you are looking for a more robust solution, this package is worth checking out: Laravel Auditor