I'm pretty new to using Laravel (5.1)/PHP and especially doing anything with the Guzzle HTTP package. I have an api I'm trying to return a response from. I'm successfully getting the response, but I need to save pieces of it to variables to use later in my applicaiton
How do I parse through the response to get the pieces of xml that I need, say anything within <status>Passing</status>
?
The following retrieves the entire xml response.
use GuzzleHttp\Client;
$client = new Client();
$res = $client->request('GET', 'https://api.com?parameter=value');
$body = $res->getBody();
echo $body;
Thanks for your help!