oxenti/historic
Composer 安装命令:
composer require oxenti/historic
包简介
Historic Behavior for CakePHP
README 文档
README
This add Behavior de historic for table
Requirements
- CakePHP 3.0+
Installation
You can install this behavior into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require oxenti/historic
Configuration
In your app's config/bootstrap.php add:
// In config/bootstrap.php Plugin::load('Historic');
or using cake's console:
./bin/cake plugin load Historic
On your app's,model add the Histotic Behevior in initialize method:
... $this->addBehavior('Historic.Historic'[ 'class' => 'Historic`s table' 'fields' => ['fields']//fields that should be saved on historic table ]); ...
Configuration files [optional]
Move the 'address.php' config file from the plugin's config folder to your app's config folder.
On your app's 'bootstrap.php' add the address configuration file:
... try { Configure::config('default', new PhpConfig()); Configure::load('app', 'default', false); } catch (\Exception $e) { die($e->getMessage() . "\n"); } Configure::load('historic', 'default'); ...
Warning
Historic's table require field is_active tyniInt(1).
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-10-28