Пример #1
0
 public function fetchProgramDetails(Request $request)
 {
     $data = $request->all();
     if (!isset($data['id'])) {
         return Response::json(array("status" => "failure", "msg" => "Missing Argument"));
     }
     $programs = SelectProgram::where('registration_id', '=', $data['id'])->first();
     if (!$programs) {
         return Response::json(array("status" => "failure", "msg" => "No data is present"));
     }
     $array = array();
     $array['program_name'] = $programs->program_name;
     $array['dual_specialization'] = $programs->dual_specialization;
     $array['nationality'] = $programs->nationality;
     $array['country'] = $programs->country;
     $array['student_region'] = $programs->student_region;
     $array['agree'] = $programs->agree;
     $array['exam_mode'] = $programs->exam_mode;
     return Response::json(array("status" => "success", "msg" => $array));
 }
 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'));
         }
     }
 }
Пример #3
0
 public static function checkProgramForUser($regId)
 {
     $program = SelectProgram::where('registration_id', '=', $regId)->first();
     return $program;
 }