arzola / tracelog

OctoberCMS Plugin to trace Eloquent actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tracelog Plugin

History changelog for eloquent models in October CMS.

Description

This plugin is a single Trait to append to your Eloquent models in OctoberCMS to be able to trace modifications on a changelog

Usage

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

Extra options

/*
 *
 * 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;

About

OctoberCMS Plugin to trace Eloquent actions


Languages

Language:PHP 99.5%Language:HTML 0.5%