title: How to use guzzle in Laravel Project
body: <p>I'm planning to use Guzzle to communicate with my XML web service.
  I am able to communicate with my XML web service using core PHP 5.6. I want to do this within my Laravel App using Guzzle to communicate with XML web service.</p>
  
  <p>My xml config code is as follows:</p>
  
  <pre><code>        $requestXmlBody  ='';
          $requestXmlBody  = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;FAB_PkgAvailRQ Target="test" Version="2002A" xmlns="https://localhost.com/find"&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;SyndicatorInfo SyndicatorId="******" SyndicatorPassword="*****"/&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;SessionInfo CreateNewSession="true"/&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;HolidaySearchRequest ResponseTimeoutSecs="60" ExcludeNonBookableSuppliers="true"&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;SearchCriteria FlightOnly="true" OneWayOnly="'.$journey_type.'" NumberOfAdults="'.$adults.'" NumberOfChildren="'.$children.'" NumberOfInfants="'.$infants.'"&gt;';
  
          $requestXmlBody = $requestXmlBody.'&lt;DepartureDateRange StartDate="'.$from.'" EndDate="'.$from.'"/&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;DepartureAirports&gt;&lt;Airport&gt;'.$origin.'&lt;/Airport&gt;&lt;/DepartureAirports&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;DestinationChoice&gt;&lt;DestinationAirports&gt;&lt;Airport&gt;'.$destination.'&lt;/Airport&gt;&lt;/DestinationAirports&gt;&lt;/DestinationChoice&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;FlightPreferences/&gt;';
  
          $requestXmlBody = $requestXmlBody.'&lt;HolidayDuration MinNumberOfNights="'.$ddays.'" MaxNumberOfNights="'.$ddays.'"/&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;/SearchCriteria&gt;';
          // $requestXmlBody = $requestXmlBody.'&lt;ResultSetPreferences MaxItems="'.$numberofsearch.'" SortCode="cost" SortAscending="true"/&gt;';
          // $requestXmlBody = $requestXmlBody.'&lt;InitialViewInfo Length="'.$numberofsearch.'" Offset="0"/&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;/HolidaySearchRequest&gt;';
          $requestXmlBody = $requestXmlBody.'&lt;/FAB_PkgAvailRQ&gt;';
  
  
         My curl code is as follows
  
          $ch = curl_init();
          curl_setopt($ch, CURLOPT_URL,"http://localhost.com/23");
          curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
          curl_setopt($ch, CURLOPT_POSTFIELDS, $requestXmlBody);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
          curl_setopt($ch, CURLOPT_HEADER, false);
  
          $result = curl_exec($ch);
  
          curl_close($ch);
          $result1 = simplexml_load_string($result);
          dd($result1);
  </code></pre>
  
  <p>I want to send a POST request using Guzzle to above xml configuration to my xml web service such as paxport/multicom.
  Any Idea How I can proceed? </p>