Update AccountController.php
This commit is contained in:
@@ -147,11 +147,21 @@ class AccountController extends Controller
|
||||
->get();
|
||||
|
||||
$total_payment = 0;
|
||||
$paymentid = $senaraisag->groupBy('payment_id');
|
||||
$paymentid = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||
->join('payment', 'lelongbidder.payment_id', '=', 'payment.id')
|
||||
->where('lelongbid.lelong_id', $request->lelong_id)
|
||||
->where('lelongbidder.user_id', $request->user_id)
|
||||
->where('lelongbidder.status_bidder', 1)
|
||||
->where('payment.status_payment_opt', 2)
|
||||
->select(
|
||||
'lelongbidder.payment_id as payment_id'
|
||||
)
|
||||
->groupBy('lelongbidder.payment_id')
|
||||
->get();
|
||||
|
||||
foreach($paymentid as $id)
|
||||
foreach($paymentid as $dataid)
|
||||
{
|
||||
$payment = Payment::where('id', $id->payment_id)->first();
|
||||
$payment = Payment::where('id', $dataid->payment_id)->first();
|
||||
$payment->disahkan_oleh = $user->id;
|
||||
$payment->disahkan_pada = $currentdate;
|
||||
$payment->save();
|
||||
|
||||
Reference in New Issue
Block a user