title: Laravel class not found even the class is there
body: <p>I am having a weird issue with resolving my classes in a Laravel application.</p>
  <pre><code>use App\Enums\UserRoles;
  use App\Enums\SocialMedia;
  use App\Models\Action;
  
  
  class SomeController extends Controller {
  
  
  
      protected function createUserFB(): Action {
          $user = Socialite::driver('facebook')-&gt;user();
          $this-&gt;extracted($user, SocialMedia::FACEBOOK); // &lt;-- ERROR HERE !! 
      }
  
  
   }  
  </code></pre>
  <p>The SocialMedia class is in Enums.php file</p>
  <pre><code>&lt;?php
  namespace App\Enums;
  
  class SocialMedia {
      const FACEBOOK = &quot;facebook&quot;;
      const GOOGLE = &quot;google&quot;;
      const TWITTER = &quot;twitter&quot;;
  }
  </code></pre>
  <p>Here is the error I am getting</p>
  <pre><code>[2021-06-28 20:53:41] local.ERROR: Class &quot;App\Enums\SocialMedia&quot; not found {&quot;exception&quot;:&quot;[object] (Error(code: 0): Class \&quot;App\\Enums\\SocialMedia\&quot; not found at ...  
  </code></pre>
  <p>I have execute</p>
  <pre><code>composer dump-autoload
  </code></pre>
  <p>and restarted the server ...</p>