yii2-serialized-attributes ActiveRecord behavior that 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'],
   			],
   		];
   	}
1 0
1 follower
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: Database
Developed by: baibaratsky
Created on: Jul 22, 2015
Last updated: 8 years ago

Related Extensions