jmillerdesign/log_action

There is no license information available for the latest version (dev-master) of this package.

CakePHP plugin to monitor changes to the database made by a user.

dev-master 2015-05-17 02:16 UTC

This package is not auto-updated.

Last update: 2024-05-11 16:02:03 UTC


README

Version 8, by J. Miller

This will monitor specified fields in your database for changes. It will log the before and after values of changes, as well as the user_id that made the change.

Installation

  1. Run the following command to create the database table log_actions.

    cake schema create --plugin LogAction

  2. Load the plugin in Config/bootstrap.php

    CakePlugin::load('LogAction');

  3. Add the behavior to the model(s) you want to monitor, and specify the fields to monitor. If you don't specify fields, then it will monitor all fields.

    public $actsAs = array( 'LogAction.LogAction' => array( 'fields' => array('title', 'body'), 'trackDelete' => false ) );

TODO

  • Add support for AppModel, to monitor all fields in all tables, or specified fields on all tables