Exemple #1
0
 /**
  * Function to get the interview based on Interview ID
  * @param $interviewID
  * @return string
  */
 public function getInterview($interviewID)
 {
     $questionAnswer = new QuestionAnswer();
     $userInterview = new UserInterview();
     $interview = Interview::where('interviewID', $interviewID)->get();
     $user = new User();
     $interviewUser = $user->getUserByID($interview[0]->userID);
     $category = new InterviewCategorie();
     $category = $category->getCategory($interview[0]->categoryID);
     $userInterview->questionAnswers = $questionAnswer->getAllQuestions($interviewID);
     $userInterview->userFullname = $interviewUser->fullname;
     $userInterview->userProfilePic = $interviewUser->profilePic;
     $userInterview->interviewCategory = $category->category;
     return json_encode($userInterview);
 }