fix link to be choose between production and local

This commit is contained in:
Hafifie PKB
2024-05-28 16:30:28 +08:00
parent a739353a6e
commit b6fa4e56f5
+7 -2
View File
@@ -580,8 +580,13 @@ class LelongController extends Controller
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
if($cawangan['tagarrahnbid'] == 1){
//$lelong = Http::withOptions(['verify' => true])->get('https://niklah.arrahn.com.my/api/portalApi',[
$lelong = Http::withOptions(['verify' => true])->get('http://adminbid.arrahn/api/portalApi',[
if(env('APP_ENV') != 'production'){
$link = 'https://niklah.arrahn.com.my/api/portalApi';
}else{
$link = 'http://adminbid.arrahn/api/portalApi';
}
$lelong = Http::withOptions(['verify' => true])->get($link,[
'norujukan' => $request->norujukan
])->json();
$lelong = ($lelong != null) ? $lelong['lelong'] : [];