title: How to upload a file using laravel that will use the exact file name on my public folder and at my database
body: <p>I have been searching a few codes but didnt manage to work.
  The one I found is using jscon encode.
  Is there any way to upload a file without changing its name into storage and database?</p>
  <pre><code>        $fileModal = new Image();
      $fileModal-&gt;name = json_encode($imgData);
      $fileModal-&gt;image_path = json_encode($imgData);
      
     
      $fileModal-&gt;save();
  </code></pre>
  <p>I didnt understand the json part. Was hoping to use a built in laravel.
  I used the one in the documentation but didnt help.</p>
  <pre><code>          $path = $request-&gt;file('namefile')-&gt;storeAs(
            'DocumenSokongan', $request-&gt;user()-&gt;id
          );
  </code></pre>