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