From 0673523b0cefe48c3bdd519509ef683f1dd568aa Mon Sep 17 00:00:00 2001 From: adeiskandarzulkarnaen Date: Thu, 8 Aug 2024 06:48:41 +0700 Subject: [PATCH] fix reservation controller --- app/Http/Controllers/Dashboard/AdminReservationController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/Dashboard/AdminReservationController.php b/app/Http/Controllers/Dashboard/AdminReservationController.php index 3781261..6405404 100644 --- a/app/Http/Controllers/Dashboard/AdminReservationController.php +++ b/app/Http/Controllers/Dashboard/AdminReservationController.php @@ -16,6 +16,7 @@ public function index(): Response $reservations = Reservation::query() ->where('status', 'success') ->with('user:id,first_name,last_name,phone,img', 'product:id,name') + ->orderBy('created_at', 'desc') ->get(); //Log::info(json_encode($reservations, JSON_PRETTY_PRINT)); @@ -27,6 +28,7 @@ public function failed(): Response $reservations = Reservation::query() ->whereNotIn('status', ['success']) ->with('user:id,first_name,last_name,phone,img', 'product:id,name') + ->orderBy('created_at', 'desc') ->get(); //Log::info(json_encode($reservations, JSON_PRETTY_PRINT));