History changelog for eloquent models in October CMS.
This plugin is a single Trait to append to your Eloquent models in OctoberCMS to be able to trace modifications on a changelog
Implement the LastEdit Trait in your model to be tracked.
use Icodemx\Tracelog\Classes\LastEdit;
For example
namespace Acme\Foo\Models;
use Icodemx\Tracelog\Classes\LastEdit;
class MyModel extends Model
{
use LastEdit;
}
And that's it.
Your model now will be tracked
/*
*
* Set this variable if you want to override the default "Updated/Deleted" msg
*
*/
public $message;
/*
*
* Set this variable you want to save some column of your model
* on the tracelog table
*
*/
public $referenceLog;