baibaratsky/yii2-serialized-attributes-behavior
最新稳定版本:v1.2.0
Composer 安装命令:
composer require baibaratsky/yii2-serialized-attributes-behavior
包简介
Yii2 Serialized Attributes Behavior
README 文档
README
This Yii2 model behavior allows you to store arrays in attributes. To attach the behavior put the following code in your model:
public function behaviors() { return [ 'serializedAttributes' => [ 'class' => SerializedAttributes::className(), // Define the attributes you want to be serialized 'attributes' => ['serializedData', 'moreSerializedData'], // Enable this option if your DB is not in UTF-8 // (more info at http://www.jackreichert.com/2014/02/02/handling-a-php-unserialize-offset-error/) // 'encode' => true, ], ]; }
统计信息
- 总下载量: 72.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 1
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-06-23