dev-master
9999999-devCakeSimpleModelHistory plugin for CakePHP (mazba.github.io)
The Requires
- php >=5.5.9
- cakephp/cakephp >=3.3.2 <4.0.0
The Development Requires
CakeSimpleModelHistory plugin for CakePHP (mazba.github.io)
You can install this plugin into your CakePHP application using composer., (*1)
Add the following lines to your application's composer.json
:, (*2)
"require": { "mazba/cake-simple-model-history": "dev-master" }
followed by the command:
composer update
, (*3)
Or, (*4)
The recommended way to install composer packages is:, (*5)
composer require "mazba/cake-simple-model-history:dev-master"
In config/bootstrap.php
add:, (*6)
Plugin::load('CakeSimpleModelHistory', ['bootstrap' => false, 'routes' => true]);
or using CakePHP's console:, (*7)
./bin/cake plugin load CakeSimpleModelHistory
Add the following line to your AppController:, (*8)
use CakeSimpleModelHistory\Controller\ActivityLogsTrait;
Add the following inside your AppController Class, (*9)
class AppController extends Controller { use ActivityLogsTrait; }
Finally, you'll also need to run migration on the package, (*10)
cake migrations migrate -p CakeSimpleModelHistory
Attach the behavior in the models you want with:, (*11)
public function initialize(array $config) { $this->addBehavior('CakeSimpleModelHistory.ActivityLogs'); }
CakeSimpleModelHistory plugin for CakePHP (mazba.github.io)