title: Multiple upload using Laravel Storage
body: <p>I was try to upload multiple files using Storage so here's my code:</p>
  
  <pre><code>public function store(Request $request)
  {
      $gallery  = new Gallery();
      $gallery-&gt;name = $request-&gt;name;
      $gallery-&gt;description = $request-&gt;description;
      $gallery-&gt;save();
  
      $path = 'public'.'/'.str_slug($request-&gt;name);
      Storage::makeDirectory(str_slug($request-&gt;name));
  
      $image = new Image();
      if ( is_array($request-&gt;images)) {
          foreach ($request-&gt;images as $file) {
              $image-&gt;gallery_id = $gallery-&gt;id;
              $image-&gt;name = $file-&gt;getClientOriginalName();
              $image-&gt;extension = $file-&gt;extension();
              $image-&gt;save();
              Storage::putFileAs($path, $file);
          }
      } else {
              $image-&gt;gallery_id = $gallery-&gt;id;
              $image-&gt;name = $request-&gt;images-&gt;getClientOriginalName();
              $image-&gt;save();
      }
  }
  </code></pre>
  
  <p>and I already setup my form like this:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label for="images" class="col-md-2 control-label"&gt;Images&lt;/label&gt;
      &lt;div class="col-md-6"&gt;
          &lt;input type="file" class="form-control" name="images[]" id="images[]" multiple&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>it give me an errors like this:</p>
  
  <blockquote>
    <p>"Type error: Too few arguments to function Illuminate\Filesystem\FilesystemAdapter::putFileAs(), 2 passed in E:\laragon\www\blog\vendor\laravel\framework\src\Illuminate\Filesystem\FilesystemManager.php on line 343 and at least 3 expected ◀"</p>
  </blockquote>
  
  <p>so the problem is it the way I check that it has multiple file using is_array is right? and the second what can cause this problems? </p>