public function showDiagnosisHistoryPdf($year, $month) { $doctor = doctor::where('userId', Auth::user()->userId)->first(); $stats = $doctor->getDiagStats($year, $month); $data = ['month' => schedule::getMonthName($month), 'date' => schedule::formatDiagDate(Carbon::now()->format('Y-m-d')), 'doctorName' => $doctor->fullname(), 'department' => $doctor->department()->departmentName, 'diag' => $stats]; $pdf = PDF::loadView('doctor/showDiagnosisHistoryPdf', $data)->setOption('page-size', 'A4'); return $pdf->stream(); }
public function getDiagDateAttribute($value) { return schedule::formatDiagDate($value); // return $value; }
public function delayAppointmentRequest(Request $request) { $input = $request; $appointment = appointment::getAppointmentDetail($input['appointmentId']); $newAppointments = schedule::requestDate($input); if ($request['date'] != '') { $formattedDate = schedule::formatDiagDate($input['date']); } return view('patient.rescheduleAppointment')->with('appointment', $appointment)->with('newAppointments', $newAppointments); }