resolve conflict
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\LelongBid;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@@ -37,6 +38,19 @@ class InformationController extends Controller
|
||||
$pembiayaansemasa = $CustomerInfo['gadai'];
|
||||
}
|
||||
|
||||
if(isset($CustomerInfo['lelong'])){
|
||||
if(sizeof($CustomerInfo['lelong']) > 0){
|
||||
foreach($CustomerInfo['lelong'] as $index=>$lelong){
|
||||
$array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json();
|
||||
|
||||
if($array_lelong['lelong'] !== null){
|
||||
$CustomerInfo['lelong'][$index] = collect($lelong)->merge($array_lelong['lelong'])->toArray();
|
||||
}
|
||||
}
|
||||
$pembiayaansemasa = collect($pembiayaansemasa)->merge($CustomerInfo['lelong']);
|
||||
$pembiayaansemasa = $pembiayaansemasa->toArray();
|
||||
}
|
||||
}
|
||||
return response()->json($pembiayaansemasa,200);
|
||||
// return view('includes.information.pembiayaanaktif',compact('pembiayaansemasa'));
|
||||
}
|
||||
@@ -71,10 +85,6 @@ class InformationController extends Controller
|
||||
$CustomerInfo = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/portal/customer/info',['ic' => $auth_user['icno']])->json();
|
||||
|
||||
$lelong = [];
|
||||
if(isset($CustomerInfo['lelong']))
|
||||
{
|
||||
$lelong += $CustomerInfo['lelong'];
|
||||
|
||||
if(isset($CustomerInfo['lelong'])){
|
||||
if(sizeof($CustomerInfo['lelong']) > 0){
|
||||
foreach($CustomerInfo['lelong'] as $index=>$lel){
|
||||
@@ -101,3 +111,4 @@ class InformationController extends Controller
|
||||
return view('auth.termasyarat', compact('termasyarat'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user