title: PHP warning: include(C:\xampp\htdocs\hse\vendor\composer/../../app/Buildings.php): failed to open stream
body: <p>I've previously manually deleted some models files in App* and created other with just removing the "s" symbol as because laravel by default can recognise the models from there name , and models by Laravel standadrd must be written normal not in plural.</p>
  
  <p>Before deleting the models that i created them using 
  php artisan make:model Buildings -m</p>
  
  <p>The new model i created after i removed the (buildings) model is 
  php artisan make:model Building 
  Notice that i just created a new model without 's' </p>
  
  <p>Now in my User model i have created method :</p>
  
  <pre><code>public function UserAssignedBuilding(){
          return $this-&gt;hasManyThrough('App\Building','App\Area','user_id','area_id');
      }
  </code></pre>
  
  <p>Building.php Model file </p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Building extends Model
  {
      protected $table = 'buildings';
  
      public function areas(){
          $this-&gt;belongsTo('App\Area');
      }
  
  }
  </code></pre>
  
  <p>Area.php Model file:</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Area extends Model
  {
      protected $fillable = [
          'name'
      ];
  
      public function users(){
          return $this-&gt;belongsToMany('App\User','area_user','area_id','user_id');
      }
  
      public function buildings(){
          return $this-&gt;hasMany('App\Building');
      }
  }
  </code></pre>
  
  <p>In php artisan when i run the following command, to get the user assigned buildings:</p>
  
  <pre><code>&gt;&gt;&gt; User::find(4)-&gt;UserAssignedBuilding
  PHP warning:  include(C:\xampp\htdocs\hse\vendor\composer/../../app/Buildings.php): failed to open stream: No such file or directory in C:\xampp\htdocs\hse\vendor\composer\ClassLoader.php on line 444
  </code></pre>
  
  <p>It seems that the error is the framework trying to load the (Buildings.php) model file, which i had already delete it and created (Building.php) instead .</p>
  
  <p>I run the following :</p>
  
  <pre><code>C:\xampp\htdocs\hse&gt;composer dumpautoload
  Generating optimized autoload files
  &gt; Illuminate\Foundation\ComposerScripts::postAutoloadDump
  &gt; @php artisan package:discover
  Discovered Package: fideloper/proxy
  Discovered Package: laravel/tinker
  Package manifest generated successfully.
  </code></pre>
  
  <p>But issue not fixed</p>
  
  <p>Also tried to get buildings rows, other error showing:-</p>
  
  <pre><code>&gt;&gt;&gt; Building::all()
  PHP Fatal error:  Class 'Building' not found in eval()'d code on line 1
  </code></pre>