/** * Finds the DctVaccination model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return DctVaccination the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { $model = DctVaccination::find()->with('dctVaccinationLocs')->where(['dct_vaccination_id' => $id])->one(); if ($model !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
/** * Lists all DctVaccination models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => DctVaccination::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }