Answer the question
In order to leave comments, you need to log in
How to change the module icon to your own?
Good day. I asked myself one question about my module, how to change the icon of the module to my own ?! Help me please. Do not write about admin.css, because after each system update, the file is overwritten!
Answer the question
In order to leave comments, you need to log in
$myModel = Mymodel::find()->where(['id'=>$someId])->one();
$data = yii\helpers\Json:decode($myModel->data);
echo $data['last_name'];
public function getLastName(){
$data = yii\helpers\Json:decode($this->data);
echo isset($data['last_name']) ? $data['last_name'] : 'не заданно';
}
$myModel = Mymodel::find()->where(['id'=>$someId])->one();
echo $myModel->lastName;
Your data is in JSON format. You can use json_decode to work with this data further.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question