mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-23 22:34:19 +00:00
fix admin completed order function not found error
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user