title: How to resolve the psr-4 error in Laravel 8?
body: <p>In Laravel 8, I use the standard structure:</p>
  <p><a href="https://i.stack.imgur.com/DOGCw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DOGCw.png" alt="enter image description here" /></a></p>
  <p>The request looks standard:</p>
  <pre><code>&lt;?php
  
  namespace App\Http\Requests\Api\Category;
  
  use Illuminate\Foundation\Http\FormRequest;
  
  class StoreCategoryRequest extends FormRequest
  {
      public function authorize()
      {
          return true;
      }
  
      public function rules()
      {
          return [
              'name' =&gt; 'required|unique:categories,name'
          ];
      }
  }
  </code></pre>
  <p>When I run composer dumpaoutoload, I get the following error:</p>
  <blockquote>
  <p>Class App\Http\Requests\Api\Category\StoreCategoryRequest located in ./app/Http/Requests/Api/Group/StoreCategoryRequest.php does not comply with psr-4 autoloading standard. Skipping.</p>
  </blockquote>
  <p>I tried to change the namespace to <code>app\Http\Requests\Api\Category</code> but it doesn't work.</p>
  <p>The example above is only one from 10.</p>
  <p>I searched for solutions, but nothing helped.</p>
  <p>Some idea what  I have to change?</p>