Show additional patient information in Dashboard Appointment

This commit is contained in:
R
2023-02-15 10:13:07 +07:00
parent 016bd3f605
commit 46af57b17c
4 changed files with 19 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ class AppointmentController extends Controller
public function index()
{
$appointments = Appointment::query()
->with('doctor.user', 'doctor.speciality', 'appointmentDetail', 'healthCare', 'user')
->with('doctor.user', 'doctor.speciality', 'appointmentDetail', 'healthCare', 'user', 'user.detail')
->latest()
->paginate(15);
return response()->json(Helper::paginateResources(AppointmentResource::collection($appointments)));