Download the PHP package macklus/yii2-metadatabehavior without Composer
On this page you can find all versions of the php package macklus/yii2-metadatabehavior. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package yii2-metadatabehavior
yii2-metadatabehavior
MetaDataBehavior allow to use one TEXT field on a database as a json data To use MetaDataBehavior, simply add this behavior into your behaviors model function
Your model table should have a TEXT field named as attribute property
Then, in your controller, you can user getMetaData(keyword,default) and setMetaData(keyword, value)
$model = MyModel::find()->where(['id' => 1])->one();
$model->setMetaData('keyword1','value1');
$model->setMetaData('otherkeyword','anothervalue');
// Other stuff
echo $model->getMetaData('keyword1');
@author José Pedro Andrés <[email protected]>
@since 2.0Yii2 MetaData Behavior
All versions of yii2-metadatabehavior with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
*
The package macklus/yii2-metadatabehavior contains the following files
Loading the files please wait ....