Exemple #1
0
 public function fetchPrgDescription($nationality, $country)
 {
     $student_type = $this->getStudentType($nationality, $country);
     $result = ProgramDetails::where('region_included', 'LIKE', '%' . $student_type . '%')->get();
     return $result;
 }
 public function finishapplication($regid)
 {
     if (!$regid == null) {
         $programdata = array();
         // getting the program name from the select program table
         $data = SelectProgram::where('registration_id', '=', $regid)->first();
         if (!$data == null) {
             $programname = $data->program_name;
             $array = ProgramDetails::where('program_name', '=', $programname)->first();
             if (!$array == null) {
                 $programdata['Progam Name'] = $programname;
                 $programdata['Program Eligibility'] = $array->program_eligibility;
                 $programdata['Program Duration'] = $array->program_duration;
                 $programdata['Program Description'] = $array->program_description;
                 return Response::json(array('status' => 'success', 'msg' => $programdata));
             } else {
                 return Response::json(array('status' => 'failure', 'msg' => 'Program does not exits'));
             }
         } else {
             return Response::json(array('status' => 'failure', 'msg' => 'Please enter a valid registration id'));
         }
     }
 }