title: How to fix laravel migrate receiving "Curl error (code 3): <url> malformed"?
body: <p>I just pulled some updates in a repository. Then when I use the command "php artisan migrate" it gives me an error. See the screenshot below.</p>
  
  <p><a href="https://i.stack.imgur.com/dzWFl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dzWFl.png" alt="enter image description here"></a></p>
  
  <p>How can I fix this?</p>
  
  <p>Or what seems to be causing this?</p>
  
  <p>Thank you!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Heres the code for Util.php. But I don't think I should be messing with it since it came from vendors directory.</p>
  
  <pre><code>&lt;?php
  </code></pre>
  
  <p>namespace Monolog\Handler\Curl;</p>
  
  <p>class Util
  {
      private static $retriableErrorCodes = array(</p>
  
  <pre><code>    CURLE_COULDNT_RESOLVE_HOST,
  
      CURLE_COULDNT_CONNECT,
  
      CURLE_HTTP_NOT_FOUND,
  
      CURLE_READ_ERROR,
  
      CURLE_OPERATION_TIMEOUTED,
  
      CURLE_HTTP_POST_ERROR,
  
      CURLE_SSL_CONNECT_ERROR,
  
  );
  
  public static function execute($ch, $retries = 5, $closeAfterDone = true)
  {
      while ($retries--) {
          if (curl_exec($ch) === false) {
              $curlErrno = curl_errno($ch);
  
              if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) {
                  $curlError = curl_error($ch);
  
                  if ($closeAfterDone) {
                      curl_close($ch);
                  }
  
                  throw new \RuntimeException(sprintf('Curl error (code %s): %s', $curlErrno, $curlError));
              }
  
              continue;
          }
  
          if ($closeAfterDone) {
              curl_close($ch);
          }
          break;
      }
  }
  </code></pre>
  
  <p>}</p>