fix link to be choose between production and local
This commit is contained in:
@@ -580,8 +580,13 @@ class LelongController extends Controller
|
|||||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
|
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
|
||||||
|
|
||||||
if($cawangan['tagarrahnbid'] == 1){
|
if($cawangan['tagarrahnbid'] == 1){
|
||||||
//$lelong = Http::withOptions(['verify' => true])->get('https://niklah.arrahn.com.my/api/portalApi',[
|
if(env('APP_ENV') != 'production'){
|
||||||
$lelong = Http::withOptions(['verify' => true])->get('http://adminbid.arrahn/api/portalApi',[
|
$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
|
'norujukan' => $request->norujukan
|
||||||
])->json();
|
])->json();
|
||||||
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
$lelong = ($lelong != null) ? $lelong['lelong'] : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user