public function getAgendas()
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $user = Sentry::getUser();
     $clinic = Clinic::where('user_id', $user->id)->first();
     $doctors = Doctor::where('clinic_id', $clinic->id)->get();
     return View::make('clinic.Agendas.agenda', ['doctors' => $doctors]);
 }
Esempio n. 2
0
 public function run()
 {
     Clinic::where('id', 1)->delete();
     Clinic::create(['id' => '1', 'name' => 'EMR Clinic', 'address' => 'DHA Lahore']);
 }
 public function edit($id)
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $user = Sentry::getUser();
     $clinic = Clinic::where('user_id', $user->id)->first();
     $doctor = Doctor::where('clinic_id', $clinic->id)->where('id', $id)->first();
     $agenda = Agenda::where('doctor_id', $doctor->id)->first();
     $esps = explode(',', $doctor->specialty_id);
     $espok = '';
     $array = array();
     foreach ($esps as $esp) {
         $very = Specialty::where('id', $esp)->first();
         if ($very) {
             $array[] = array('value' => $very->id, 'text' => $very->name_es);
         }
     }
     $profile = Profile::where('user_id', $doctor->user_id)->first();
     return View::make('clinic.doctors.edit', ['agenda' => $agenda, 'doctor' => $doctor, 'profile' => $profile, 'specialty' => $array]);
 }
Esempio n. 4
0
 public static function getClinicId()
 {
     $user = Sentry::getUser();
     $clinic = Clinic::where('user_id', $user->id)->first();
     return $clinic->id;
 }