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