title: Disk [public] does not have a configured driver. in laravel image upload
body: <p>I am trying to upload a file to a public folder which was working lately but now it is showing below error:</p>
  
  <blockquote>
    <p>Disk [public] does not have a configured driver.</p>
  </blockquote>
  
  <p>I tried checking for configured driver in <em>config/filesystems.php</em> but, it is already set there. I am not getting where the issue might be.</p>
  
  <p>Upload code: </p>
  
  <pre class="lang-php prettyprint-override"><code>public function upload(ProductImageRequest $request, Product $product)
  {
      $image = $request-&gt;file('file');
      $dbPath = $image-&gt;storePublicly('uploads/catalog/'.$product-&gt;id, 'public');
  
      if ($product-&gt;images === null || $product-&gt;images-&gt;count() === 0) {
          $imageModel = $product-&gt;images()-&gt;create(
              ['path' =&gt; $dbPath,
              'is_main_image' =&gt; 1, ]
          );
      } else {
          $imageModel = $product-&gt;images()-&gt;create(['path' =&gt; $dbPath]);
      }
  
      return response()-&gt;json(['image' =&gt; $imageModel]);
  }
  </code></pre>
  
  <p>Code in <em>config/filesystems.php</em></p>
  
  <pre class="lang-php prettyprint-override"><code>'disks' =&gt; [
  
          'local' =&gt; [
              'driver' =&gt; 'local',
              'root' =&gt; storage_path('app'),
          ],
  
          'public' =&gt; [
              'driver' =&gt; 'local',
              'root' =&gt; storage_path('app/public'),
              'url' =&gt; env('APP_URL').'/storage',
              'visibility' =&gt; 'public',
          ],
  </code></pre>