public function actionView($id)
 {
     $sections = Section::find()->all();
     $model = Section::find()->where(['id' => $id])->one();
     $mips = Mip::find()->where(['section_id' => $id])->all();
     return $this->render('view', ['sections' => $sections, 'model' => $model, 'mips' => $mips]);
 }
Example #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMips()
 {
     return $this->hasMany(Mip::className(), ['user_id' => 'id']);
 }