Ejemplo n.º 1
0
 public function complete_survey_request($id)
 {
     $survey = $this->repo->getSurvey($id);
     if ($survey->completed == true) {
         return view('admin.surveys.sorry');
     }
     return view('admin.surveys.complete_survey', compact('survey'));
 }
Ejemplo n.º 2
0
 /**
  * @param $taskId
  */
 public function completeTask($taskId)
 {
     $task = Task::find($taskId);
     //See if the task was an appointment and send survey
     if ($task->name == 'Appointment') {
         $survey = new SurveyRepo();
         $survey->generateSurvey($task->user_id, $task->recruit_id);
     }
     $task->completed = true;
     $task->save();
 }