prepare to merge

This commit is contained in:
lonetrinity
2018-08-17 11:04:44 +08:00
parent 3a39f7407c
commit 5db9908a57
+18 -2
View File
@@ -234,11 +234,27 @@ class BookingController extends Controller
$user = Auth::user();
$bookings = Booking::select('user_id', 'id', 'created_at', 'admin_status', 'rate', 'term', 'amount', 'bia', 'verification_status')
->where('admin_status', '=', '6')
->orwhere('admin_status', '=', '7')
->where(function ($query) {
$query->where('admin_status', '=', '6')
->orwhere('term', '=', 'x2_cash')
->orwhere('term', '=', 'x2_cheque')
->orwhere('term', '=', 'x2_ba');
})
->orWhere(function ($query) {
$query->where('admin_status', '=', '7')
->orwhere('term', '=', 'x1_cash')
->orwhere('term', '=', 'x1_cheque')
->orwhere('term', '=', 'x1_ba');
})
->orderby('updated_at','desc')
->paginate(10);
// reformat to fit frontend structure
foreach ($bookings as $booking) {
// set timeout