title: asynchronous guzzle call to a function while seeding in laravel
body: <p>I am trying to fetch geocodes from an api and update in my database against address entries. I am running this through a seed class in laravel.</p>
  
  <p>And <strong>I am using Guzzle to make an asynchronous call. I want to run the api calls asynchronously while at the same time I want to read the asynchronous response in the background and update them in the database.</strong></p>
  
  <pre><code>$client = new \GuzzleHttp\Client();
  //retrieve the the latitude and longitude from geocode.farm of the given address
  $response = $client-&gt;get('http:........&lt;url for json request goes here&gt;',['future' =&gt; true]);
  $response-&gt;then(function ($response) {
    // in here I read the $response object and get the latitude /longitude to update in the database.
  </code></pre>
  
  <p>// I tried to echo and print here, it seems the script is not entering here in this callback function
      });</p>
  
  <p>I am calling the above line of code in a loop. The above script runs fine when I make a synchronous call, but in asynchronous call I am unable to run it? can you please help me with it.</p>
  
  <p>the script doesn't seem to enter in the callback function</p>