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'],
],
];
}
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.