Example #1
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]);
 }
Example #2
0
 public function updateStatusCourse($idtblCourses)
 {
     $education = ['idcatstatus' => '4'];
     if (courseModel::where('idtblCourses', '=', $idtblCourses)->update($education)) {
         return true;
     } else {
         return false;
     }
 }
Example #3
0
 public function obtenerCursos($request)
 {
     $course = courseModel::where('idtblDr', '=', $request->idtblDr)->where('idcatstatus', '<>', '4')->get();
     if ($course) {
         return Response::json(array('success' => '1', 'data' => $course, 'msg' => 'Registros obtenidos con exito.'));
     } else {
         return Response::json(array('success' => '0', 'data' => '', 'msg' => 'No hay registro asociados'));
     }
 }
Example #4
0
 public static function obtenerCursosPorUsuario($idUser)
 {
     $courses = json_decode(courseModel::where('idtblusers', $idUser)->where('idcatstatus', '<>', '4')->orderBy('tblcoursesdateinit', 'desc')->select('*', DB::raw("DATE_FORMAT(tblcoursesdateinit,' %M %Y ') as format_star_date_course"), DB::raw("CONCAT(TIMESTAMPDIFF(MONTH,tblcoursesdateinit,tblcoursesdateend),' meses') AS diff_time"), DB::raw("IF(tblcoursescurrent=1,'Actual'," . DB::raw("DATE_FORMAT(tblcoursesdateend,' %M %Y ')") . ") AS tblcourseenddateIF"))->get(), 2);
     return $courses;
 }