コード例 #1
0
ファイル: homeController.php プロジェクト: rldiezn/platzy
 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");
 }
コード例 #2
0
ファイル: educationModel.php プロジェクト: rldiezn/platzy
 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;
 }
コード例 #3
0
ファイル: doctorController.php プロジェクト: rldiezn/platzy
 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]);
 }
コード例 #4
0
ファイル: educationModel.php プロジェクト: rldiezn/platzy
 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'));
     }
 }
コード例 #5
0
ファイル: doctorModel.php プロジェクト: rldiezn/platzy
 public function updateStatusEducation($idEducation)
 {
     $education = ['idcatstatus' => '4'];
     if (educationModel::where('idtblEducation', '=', $idEducation)->update($education)) {
         return true;
     } else {
         return false;
     }
 }
コード例 #6
0
 public function obtenerEstudios(Request $request)
 {
     $education = new educationModel();
     $response = $education->obtenerEstudios($request);
     return $response;
 }