コード例 #1
0
 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]);
 }
コード例 #2
0
 public function run()
 {
     Clinic::where('id', 1)->delete();
     Clinic::create(['id' => '1', 'name' => 'EMR Clinic', 'address' => 'DHA Lahore']);
 }
コード例 #3
0
 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]);
 }
コード例 #4
0
ファイル: Clinic.php プロジェクト: jnicolasbc/admin_swp_com
 public static function getClinicId()
 {
     $user = Sentry::getUser();
     $clinic = Clinic::where('user_id', $user->id)->first();
     return $clinic->id;
 }