Example #1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $scholarship = Scholarship::find($id)->toArray();
     $bioData = BioData::find($id)->toArray();
     $basicQualification = BasicQualifications::find($id)->toArray();
     $highInst = HigherInst::find($id)->toArray();
     $profQualification = ProfQualifications::find($id)->toArray();
     return Response::json(array($scholarship, $bioData, $basicQualification, $highInst, $profQualification), 200);
 }
Example #2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //
     $scholarship = Scholarship::find($id);
     $biodata = BioData::find($id);
     $highinst = HigherInst::find($id);
     $profQualification = ProfQualifications::find($id);
     $singleApplicant = new stdClass();
     $singleApplicant->scholarship = $scholarship ? $scholarship->toArray() : null;
     $singleApplicant->bioData = $biodata ? $biodata->toArray() : null;
     $singleApplicant->higherInst = $highinst ? $highinst->toArray() : null;
     $singleApplicant->profQualification = $profQualification ? $profQualification->toArray() : null;
     return Response::json($singleApplicant, 200);
 }
Example #3
0
 public function addProfQuali()
 {
     $client = (object) Input::all();
     $db = ProfQualifications::where('user_id', '=', $client->user_id)->first();
     $appData = ApplicationData::find(Input::all()['user_id']);
     $form_comp_data = FormCompleteData::find(Input::all()['user_id']);
     if (is_null($db)) {
         $db = new ProfQualifications();
         foreach ($client as $key => $value) {
             $db->{$key} = $value;
         }
         $db->save();
         $appData->app_progress = 20 + $appData->app_progress;
         $appData->save();
         $form_comp_data->professionbal_qualification_completed = "1";
         $form_comp_data->save();
         return Response::json(array('warning' => 'Adding new stuff'));
     } else {
         foreach ($client as $key => $value) {
             $db->{$key} = $value;
         }
         $db->save();
         return Response::json(array('Warning' => 'Updating old stuff'));
     }
 }