dev-master
9999999-devHistoric Behavior for CakePHP
The Requires
- php >=5.4.16
- cakephp/cakephp ~3.0
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Historic Behavior for CakePHP
This add Behavior de historic for table, (*1)
You can install this behavior into your CakePHP application using composer., (*2)
The recommended way to install composer packages is:, (*3)
composer require oxenti/historic
In your app's config/bootstrap.php add:, (*4)
// In config/bootstrap.php
Plugin::load('Historic');
or using cake's console:, (*5)
./bin/cake plugin load Historic
On your app's,model add the Histotic Behevior in initialize method:, (*6)
...
$this->addBehavior('Historic.Historic'[
'class' => 'Historic`s table'
'fields' => ['fields']//fields that should be saved on historic table
]);
...
Move the 'address.php' config file from the plugin's config folder to your app's config folder., (*7)
On your app's 'bootstrap.php' add the address configuration file:, (*8)
...
try {
Configure::config('default', new PhpConfig());
Configure::load('app', 'default', false);
} catch (\Exception $e) {
die($e->getMessage() . "\n");
}
Configure::load('historic', 'default');
...
Historic's table require field is_active tyniInt(1)., (*9)
Historic Behavior for CakePHP