Make api arrahnbid url configurable

This commit is contained in:
Afiq Hamzah
2024-06-24 18:43:22 +08:00
parent c10518b466
commit 91c6041e08
3 changed files with 6 additions and 6 deletions
+2 -4
View File
@@ -649,9 +649,7 @@ class LelongController extends Controller
$cawangan = Cawangan::on('mysql7')->where('kodcaw', '=', $request->kodcaw)->first();
if ($cawangan['tagarrahnbid'] == 0){
// $lelong = Http::withOptions(['verify' => true])->get('https://niklah.arrahn.com.my/api/portalApi',[
$lelong = Http::withOptions(['verify' => true])->get('https://stapi.arrahn.com.my/api/portalApi',[
// $lelong = Http::withOptions(['verify' => true])->get('https://api_arrahn.test/api/portalApi',[
$lelong = Http::withOptions(['verify' => true])->get(config('app.api_arrahnbid').'portalApi',[
'norujukan' => $request->norujukan
])->json();
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
@@ -724,7 +722,7 @@ class LelongController extends Controller
if($cawangan['tagarrahnbid'] == 1)
{
$lelong = Http::withOptions(['verify' => true])->get('http://stapibid.arrahn.com.my/api/portalApi',['norujukan' => $request->norujukan])->json();
$lelong = Http::withOptions(['verify' => true])->get(config('app.api_arrahnbid').'portalApi',['norujukan' => $request->norujukan])->json();
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
}else{
$lelong = Lelong::on($cawangan['mysql'])->where([['norujukan',$request->norujukan]])->first();