From 017f70391e0ad38ceac587d835f6c16140a4c1d3 Mon Sep 17 00:00:00 2001 From: Jack Goh Date: Sun, 22 Jul 2018 18:30:23 +0800 Subject: [PATCH] fix admin completed order function not found error --- app/Http/Controllers/BookingController.php | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/Http/Controllers/BookingController.php b/app/Http/Controllers/BookingController.php index 1088d894..e03e922c 100644 --- a/app/Http/Controllers/BookingController.php +++ b/app/Http/Controllers/BookingController.php @@ -791,23 +791,23 @@ class BookingController extends Controller } } - // public function adminShowCompletedOrders() - // { - // $bookings = Booking::select('id','created_at','user_id','rate','amount', 'bia', 'admin_status') - // ->where('admin_status', 7) - // ->orderBy('id', 'desc') - // ->get(); + public function adminShowCompletedOrders() + { + $bookings = Booking::select('id','created_at','user_id','rate','amount', 'bia', 'admin_status') + ->where('admin_status', 7) + ->orderBy('id', 'desc') + ->get(); - // foreach ($bookings as $booking) { - // $booking->id; - // $booking->created_at; - // $booking->marking = $booking->user->marking; - // $booking->rate; - // $booking->amount; - // $booking->bia; - // $booking->admin_status = "(". $booking->admin_status ."/7)";; - // } - // return $bookings; - // } + foreach ($bookings as $booking) { + $booking->id; + $booking->created_at; + $booking->marking = $booking->user->marking; + $booking->rate; + $booking->amount; + $booking->bia; + $booking->admin_status = "(". $booking->admin_status ."/7)";; + } + return $bookings; + } }