Make api arrahnbid url configurable
This commit is contained in:
+2
-1
@@ -4,6 +4,7 @@ APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://api_arrahn.test
|
||||
APP_TIMEZONE=Asia/Kuala_Lumpur
|
||||
API_ARRAHNBID=http://lelong.test/api/
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_SLACK_WEBHOOK_URL=
|
||||
@@ -253,4 +254,4 @@ ONEWAYSMS_AUTH_USER=APIUK330HDAFO
|
||||
ONEWAYSMS_AUTH_PASS=APIUK330HDAFOUK330
|
||||
|
||||
ADMIN_PHONE_NUMBER=60178916936
|
||||
ACTIVE_JOB_SERVER=true
|
||||
ACTIVE_JOB_SERVER=false
|
||||
|
||||
@@ -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();
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'url' => env('APP_URL', url('/'))
|
||||
'url' => env('APP_URL', url('/')),
|
||||
'api_arrahnbid' => env('API_ARRAHNBID', 'http://lelong.test/api/')
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user