fix arrahnbid connection

This commit is contained in:
hafifierahman
2023-01-10 13:06:59 +08:00
parent b17f60a71c
commit 4e990ffb5f
@@ -41,8 +41,8 @@ class InformationController extends Controller
if(isset($CustomerInfo['lelong'])){
if(sizeof($CustomerInfo['lelong']) > 0){
foreach($CustomerInfo['lelong'] as $index=>$lelong){
$array_lelong = LelongBid::select('fasa','t_lelong')->where([['norujukan',$lelong['norujukan']],['hargajual','>',0]])->first()->toArray();
$CustomerInfo['lelong'][$index] = collect($lelong)->merge($array_lelong)->toArray();
$array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lel['norujukan']])->json();
$CustomerInfo['lelong'][$index] = collect($lelong)->merge($array_lelong['lelong'])->toArray();
}
$pembiayaansemasa = collect($pembiayaansemasa)->merge($CustomerInfo['lelong']);
}
@@ -86,8 +86,10 @@ class InformationController extends Controller
if(isset($CustomerInfo['lelong'])){
if(sizeof($CustomerInfo['lelong']) > 0){
foreach($CustomerInfo['lelong'] as $index=>$lel){
$array_lelong = LelongBid::select('fasa','t_lelong')->where([['norujukan',$lel['norujukan']],['hargajual','>',0]])->first()->toArray();
$CustomerInfo['lelong'][$index] = collect($lel)->merge($array_lelong)->toArray();
$array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lel['norujukan']])->json();
if($array_lelong['lelong'] !== null){
$CustomerInfo['lelong'][$index] = collect($lel)->merge($array_lelong['lelong'])->toArray();
}
}
$lelong = collect($lelong)->merge($CustomerInfo['lelong']);
}