Exemple #1
0
 public function seeProfile($idUser = 37)
 {
     //        echo '<pre>';print_r(Auth::user());exit;
     $idUser = 37;
     if (user::find($idUser) != false) {
         DB::statement("SET lc_time_names = 'es_ES'");
         $dataUser = array('infoGeneral' => user::find($idUser), 'infoSocialin' => user::find($idUser)->socialin, 'infoExperience' => experienceModel::obtenerExperienciaPorUsuario($idUser), 'infoEducation' => educationModel::obtenerEstudiosPorUsuario($idUser), 'infoCourse' => courseModel::obtenerCursosPorUsuario($idUser));
         //            $doctor['infoLinkedin']['srcImage']=doctorModel::isImageHere($doctor['infoLinkedin']);
         //            $doctor['infoLinkedin']['currentExperiences']=$exp->getCurrentExperience($idUser);
         //            $doctor['infoLinkedin']['oldExperiences']=$exp->getOldExperience($idUser);
         //            echo '<pre>';print_r($dataUser);exit;
         return view('perfil.show', ['dataUser' => $dataUser]);
     } else {
         //si el usuario no existe
         return redirect()->route('home');
     }
     return view("perfil.show");
 }
Exemple #2
0
 public static function obtenerEstudiosPorUsuario($idUser)
 {
     $educations = json_decode(educationModel::where('idtblusers', $idUser)->where('idcatstatus', '<>', '4')->orderBy('tbleducationstartdate', 'desc')->select('*', DB::raw("DATE_FORMAT(tbleducationstartdate,' %M %Y ') as format_star_date_est"), DB::raw("CONCAT(TIMESTAMPDIFF(MONTH,tbleducationstartdate,tbleducationenddate),' meses') AS diff_time"), DB::raw("IF(tbleducationcurrent=1,'Actual'," . DB::raw("DATE_FORMAT(tbleducationenddate,' %M %Y ')") . ") AS tbleducationenddateIF"))->get(), 2);
     return $educations;
 }
Exemple #3
0
 public function showEdit($id)
 {
     $menu = new menuModel();
     $arrayMenu = $menu->generateMenu();
     $isDoctor = $menu->isDoctor();
     $exp = new experienceModel();
     $doctor = array('infoGeneral' => doctorModel::find($id), 'infoLinkedin' => doctorModel::find($id)->linkedin, 'infoExperience' => json_decode(experienceModel::where('idtblDr', $id)->where('idcatstatus', '<>', '4')->orderBy('tblExperienceStartDate', 'desc')->get(), 2), 'infoEducation' => json_decode(educationModel::where('idtblDr', $id)->where('idcatstatus', '<>', '4')->orderBy('tblEducationStartDate', 'desc')->get(), 2), 'infoCourse' => json_decode(courseModel::where('idtblDr', $id)->where('idcatstatus', '<>', '4')->orderBy('tblCoursesDateInit', 'desc')->get(), 2));
     $doctor['infoLinkedin']['srcImage'] = doctorModel::isImageHere($doctor['infoLinkedin']);
     $doctor['infoLinkedin']['currentExperiences'] = $exp->getCurrentExperience($id);
     $doctor['infoLinkedin']['oldExperiences'] = $exp->getOldExperience($id);
     return view('doctor.edit-perfil', ['doctor' => $doctor, 'menu' => $arrayMenu, 'isDoctor' => $isDoctor]);
 }
Exemple #4
0
 public function obtenerEstudios($request)
 {
     $education = educationModel::where('idtblDr', '=', $request->idtblDr)->where('idcatstatus', '<>', '4')->get();
     if ($education) {
         return Response::json(array('success' => '1', 'data' => $education, 'msg' => 'Registros obtenidos con exito.'));
     } else {
         return Response::json(array('success' => '0', 'data' => '', 'msg' => 'No hay registro asociados'));
     }
 }
Exemple #5
0
 public function updateStatusEducation($idEducation)
 {
     $education = ['idcatstatus' => '4'];
     if (educationModel::where('idtblEducation', '=', $idEducation)->update($education)) {
         return true;
     } else {
         return false;
     }
 }
 public function obtenerEstudios(Request $request)
 {
     $education = new educationModel();
     $response = $education->obtenerEstudios($request);
     return $response;
 }