/** * Finds the EventoHasVoluntario model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param string $evento_idevento * @param integer $voluntario_idvoluntario * @return EventoHasVoluntario the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($evento_idevento, $voluntario_idvoluntario) { if (($model = EventoHasVoluntario::findOne(['evento_idevento' => $evento_idevento, 'voluntario_idvoluntario' => $voluntario_idvoluntario])) !== null) { return $model; } else { throw new NotFoundHttpException('Página não Encontrada'); } }