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));