Merge branch 'main' into amir_dev_2

This commit is contained in:
Amir
2023-01-03 10:19:26 +08:00
+12 -12
View File
@@ -2085,7 +2085,7 @@ class LelongController extends Controller
$month = $current->month;
$year = $current->format('y');
$today = $current->format('Y-m-d');
$today = $current->format('2022-12-24');
// dd($today);
$lelong = Lelong::where('id', '=', $lelong_id)->first();
@@ -2173,18 +2173,7 @@ class LelongController extends Controller
$invoice->total_invoice = '0.00';
$invoice->invoice_type = 2; // 1 = fee , 2 = bid
$invoice->save();
// dd($invoice->toArray());
// dd("sni");
//sending notify emel kepada pembida
}
//send email
// Mail::to($userdetails['email'])->send(new Pemenang($userdetails['name']));
// //send sms
// Nexmo::message()->send([
// 'to' => $userdetails['notelbimbit'],
// 'from' => 'Sender',
// 'text' => 'ArrahnBid-Tahniah Anda Pemenang ArrahnBid, sila semak dalam pautan ini. https://bid.arrahn.com.my'
// ]);
} else {
$kalah = LelongBidder::where('id', '=', $bidder->id)
->first();
@@ -2206,6 +2195,17 @@ class LelongController extends Controller
$userdetailsnoti = User::where('id', $noti['nopembeli'])->first();
// dd($userdetailsnoti);
Mail::to($userdetailsnoti['email'])->send(new Pemenang($userdetailsnoti['name']));
//blast whatsapp notifikasi
$mobileno = ltrim($userdetailsnoti['notelbimbit'], '+');
$messages = 'AR-RAHN PKB: Tahniah Anda Pemenang ArrahnBid, Sila Semak Melalui Pautan ini. https://bid.arrahn.com.my';
$status = Http::get(env('WABOT_API'),[
'number' => $mobileno,
'type' => 'text',
'message' => $messages,
'instance_id' => env('WABOT_INSTANCES_ID'),
'access_token'=> env('WABOT_TOKEN_KEYS')
]);
}
$lelong->sts_lelong = 3; //siap jana pemenang