title: Uncaught Error "Class not found" in Laravel 5.8
body: <p>I am trying to call my model file from another folder. I have provided both of these file structure.</p>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>Uncaught Error: Class 'App\Models\Providers' not found in /Applications/XAMPP/xamppfiles/htdocs/pro/app/Scripts/Providers/1/Scrape.php:17</p>
  </blockquote>
  
  <p>I am calling the model file from a script folder located :</p>
  
  <pre><code>app/Scripts/Providers/1/Scrape.php
  </code></pre>
  
  <p>In this class I have the below :</p>
  
  <pre><code>namespace App\Scripts\Providers\1;
  use App\Models;
  </code></pre>
  
  <p>Model file is located :</p>
  
  <pre><code>app/Models/Providers.php
  </code></pre>
  
  <p>Within this file I have the below:</p>
  
  <pre><code>namespace App\Models;
  
  use Illuminate\Database\Eloquent\Model;
  </code></pre>
  
  <p>I have not shared the full content that I have in both of these files. If you would like to see the full content of these files please let me know.</p>
  
  <p>This is how the Scrape.php looks like</p>
  
  <pre><code>&lt;?php
  namespace App\Scripts\Providers\1;
  use App\Models\Providers;
  
  class Scrape {
      public function __construct() {
          $test = new \App\Models\Providers();
          die(print_r($test, true));
      }
  }
  
  $obj = new Scrape();
  </code></pre>