lundi 4 mars 2019

Invalid argument supplied for foreach() in laravel 5.7

I want to check status data using an API in Laravel. This is my API data when i checking using SoapUI

enter image description here

And this is my controller :

public function send_start_status_hh(Request $request)
{
     $url = "http://100.27.1.8:8280/services/PS_Field_Activity?wsdl";
     $client = new \nusoap_client($url, 'wsdl');

     $pFaId = $request->input('fa_transaction_id');
     $operation = 'getFaStatusSingle';
     $param1 = array(
         'pFaId' => $pFaId,
     );
     $hasil1 = $client->call($operation, $param1);

     foreach ($hasil1['getFaStatusSingle'] as $value) {
        print_r($value);
     }
     exit();
}

but when i checking it in postman i got an error Invalid argument supplied for foreach() like image below

enter image description here

how to fix it, i want to get data



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire