Example #1
0
 public function nuevoDoctor($request)
 {
     $user = new User(['name' => $request->formDataJson['name'], 'email' => $request->formDataJson['email'], 'password' => bcrypt($request->formDataJson['password'])]);
     $user->role = 'doctor';
     $user->save();
     $insert_id = $user->id;
     $this->idtbluser = $insert_id;
     $this->tblDoctorName = $request->formDataJson['name'];
     $this->tblDoctorPaterno = $request->formDataJson['aPaterno'];
     $this->tblDoctorMaterno = $request->formDataJson['aMaterno'];
     $this->tblDoctoremail = $request->formDataJson['email'];
     $this->cathospital = $request->formDataJson['cathospital'];
     $this->save();
     $insert_id_doctor = $this->idtblDr;
     $linkedin = new linkedinModel(['idtblDr' => $insert_id_doctor, 'tblLinkedInDrProfHead' => $request->formDataJson['tblLinkedInDrProfHead']]);
     if (!$linkedin->save()) {
         return json_encode(array('estado' => '0', 'msg' => 'Error al registrar el doctor', 'datos' => $this));
     } else {
         return json_encode(array('estado' => '1', 'msg' => 'El registro se ha realizado satisfactoriamente', 'datos' => $this));
     }
 }
Example #2
0
 public function editarDireccionFiscal(Request $request)
 {
     $linkedin = new linkedinModel();
     $response = $linkedin->editarDireccionFiscal($request);
     return $response;
 }