/** * 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); }
/** * 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); }
public function fetchPreview() { $scholarship = Scholarship::find(Input::all()['user_id']); //where('user_id','=',Input::all()['user_id'])->first(); $biodata = BioData::find(Input::all()['user_id']); //where('user_id','=',Input::all()['user_id'])->first(); $basicQualification = BasicQualifications::find(Input::all()['user_id']); //where('user_id','=',Input::all()['user_id'])->first(); $higher_inst = HigherInst::find(Input::all()['user_id']); //where('user_id','=',Input::all()['user_id'])->first(); $profquali = ProfQualifications::find(Input::all()['user_id']); //where('user_id','=',Input::all()['user_id'])->first(); $previewData = new stdClass(); $previewData->scholarship = $scholarship ? $scholarship->toArray() : null; $previewData->bioData = $biodata ? $biodata->toArray() : null; $previewData->basicQualifications = $basicQualification ? $basicQualification->toArray() : null; $previewData->profquali = $profquali ? $profquali->toArray() : null; $previewData->higherInst = $higher_inst ? $higher_inst->toArray() : null; return Response::json($previewData, 200); }