|
|
@ -760,6 +760,17 @@ class ProjectController extends Controller |
|
|
|
return response()->json(['status' => 'success', 'code' => 200, 'data' => $data], 200); |
|
|
|
return response()->json(['status' => 'success', 'code' => 200, 'data' => $data], 200); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getProjectCostIntegration($name) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$search = urlencode($name); |
|
|
|
|
|
|
|
if (empty($search)) |
|
|
|
|
|
|
|
return response()->json(['status' => 'error', 'message' => 'Empty query string!'], 400); |
|
|
|
|
|
|
|
$url = str_replace("SEARCH", $search, config('api.adw') . '/project_cost?project_no=SEARCH'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$response = MasterFunctionsHelper::curlReq($url); |
|
|
|
|
|
|
|
return response()->json(['status' => 'success', 'data' => $response, 'code' => 200], 200); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private function httpReq($search) |
|
|
|
private function httpReq($search) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$ch = curl_init(); |
|
|
|
$ch = curl_init(); |
|
|
|