Use this tag if your question relates to the Yii2-model-class or one of its descendants.
Previously, I was not using $model->save() function for inserting or updating any data. I was simply using createCommand() …
php yii2 yii2-basic-app yii2-modelThis may seem like a trivial question, however all of the obvious solutions that I can think of have their …
activerecord yii2 yii2-model yii2-validationI used Yii2 multiple selection dropdown , it is working fine at create but not showing me selected values on update! …
yii2 yii2-modelIn Login form, I need to have glyphicon-remove icon at the end of every validation message with the corresponding field …
php yii2 yii2-model yii2-validationI want access to hasMany relation but i get error with this content PHP Notice – yii\base\ErrorException Trying to …
php yii2 yii2-modelIn controller i have: public function actionGetItems() { $model = new \app\models\WarehouseItems; $items = $model->find()->with(['user'])…
yii2 yii2-modelI'm using Yii2 gridview widget to display the data. I'm using two tables named as message and message_trigger. In …
gridview yii2 yii2-modelHow to use multiple models in one form in Yii2? My case: In my create action I can save into …
php yii2 yii2-modelI have a form <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form-&…
yii2 yii2-advanced-app yii2-basic-app yii2-model yii2-validationpublic function actionIndex() { $searchModel = new SubjectSearch(); $searchModel->search()->query->andFilterWhere(['in','subjectID',[1,2,3]]); $dataProvider = $searchModel->search(…
php yii2 many-to-many yii2-model