title: How can I use a class from vendor folder in laravel project
body: <p>I am trying to include guzzle http client from a vendor folder and using composer. Here is what I have tried so far. </p>
  
  <p>Location of guzzle http client file <code>vendor/guzzle/guzzle/src/Guzzle/Http/Client.php</code></p>
  
  <p>In composer.json file I included </p>
  
  <pre><code>"autoload": {
      "classmap": [
          "database/seeds",
          "database/factories"
      ],
      "files":["vendor/guzzle/guzzle/src/Guzzle/Http/Client.php"],
      "psr-4": {
          "App\\": "app/"
      }
  },
  </code></pre>
  
  <p>The I ran the command <code>composer dumpautoload</code>.</p>
  
  <p>In my controller I am trying to call an api end point like this </p>
  
  <pre><code>use GuzzleHttp\Client;
  $client = new Client(); // this line gives error 
  $res = $client-&gt;get('https://api.fixer.io/latest?symbols=CZK,EURO');
  </code></pre>
  
  <p>The error is <code>Class 'GuzzleHttp\Client' not found</code></p>
  
  <p>What I am missing here, please help me. Thanks. </p>
  
  <p><strong>For a better file structure here is a screenshot of of the file location</strong>
  <a href="https://i.stack.imgur.com/MZ0yu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MZ0yu.png" alt="enter image description here"></a></p>