/** * Finds the Participantes model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param string $documento * @param integer $id_comite * @return Participantes the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($documento, $id_comite) { if (($model = Participantes::findOne(['documento' => $documento, 'id_comite' => $id_comite])) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }