title: using S3 Laravel8 create a unique folder with every upload file
body: <p>I have this code is working perfectly fine, But I want when I upload the image 1st time to create a new folder and store the image, as I want 2nd time when I upload a new file to create a new unique folder and store the file...</p>
  <p>Please help me with this if someone knows how to do this because I am new to Laravel.</p>
  <p>public function storemultipleImages(Request $request)
  {</p>
  <pre><code>    $this-&gt;validate($request, ['image' =&gt; 'required|image']);
      if ($request-&gt;hasfile('image')) {
          $file = $request-&gt;file('image');
          $name = time() . $file-&gt;getClientOriginalName();
          $filePath = 'poster_art_1/' . $name;
         Storage::disk('s3')-&gt;put($filePath, file_get_contents($file));
       
          return back()-&gt;with('success', 'Image Uploaded successfully');
      }
  </code></pre>
  <p>}</p>