Something I misunderstand in the following:
// в POST $model->name пришло любое значение $model->name = 'test'; print_r($model->name); // Вывод 'test' // в POST $model->content['image'] пришло пустое значение $model->content['image'] = UploadedFile::getInstance($model,'content[image]'); // или $model->content['image'] = 'любойтекст'; print_r($model->content['image']); // Вывод пустой On the rules you can not navigate
In the content field I store various values that are not required for building queries to the database, these can be meta tags, images. Then in BeforeSave, I re-encode the array $ this-> content into JSON and add it to the database.
As you can see from the code above, I just cannot reassign any element of the $ model-> content array, but I can reassign any $ model property of only the first level