mirko-pagliai/cakephp-entities-logger

Entities Logger plugin for CakePHP

dev-main 2025-06-16 18:22 UTC

This package is auto-updated.

Last update: 2025-06-16 18:23:05 UTC


README

You can install the plugin via composer:

composer require --prefer-dist mirko-pagliai/cakephp-entities-logger

Load the plugin

$this->addPlugin('Cake/EntitiesLogger');

Create the table

CREATE TABLE IF NOT EXISTS `entities_changes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `entity_class` varchar(255) NOT NULL,
  `entity_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(100) NOT NULL,
  `datetime` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;