Can anyone solve this problem using GuzzleHttp? I want to display the $reportid in controller, but I'm stuck at the moment.
//Select Data For SDO Homepage Report
public function SDOHomepage(){
$client = new \GuzzleHttp\Client();
$url=WEBSERVICE_URL;
//Response 1
$response1=$client->request('POST', $url,['form_params'=>['tag'=>'selectSDOHomepage']]);
//$body = $response1->getBody();
//$reportid = $body['ReportID'];
//Response 2
$response2=$client->request('POST', $url,['form_params'=>['tag'=>'sdoCountReply','ReportID'=>$reportid]]);
$data1=json_decode($response1->getBody()->getContents(),true);
$data2=json_decode($response2->getBody()->getContents(),true);
//Return Data
return view('SDOHomepage',['SDO_All'=>$data1,'SDO_Reply_Count'=>$data2]);
}