title: Laravel: Trouble with uploading files on localhost
body: <p>I've trouble getting the file upload working with Laravel on my Windows 7 system. There is no issue with uploading the files but when I see the destination directory the uploaded file is not present.</p>
  
  <p>After searching in Google and forums I found that there may be a problem with the 'Temp' directory.</p>
  
  <p>The output of <code>dd(sys_get_temp_dir())</code> is <code>C:\Users\RAGHAV~1\AppData\Local\Temp</code>.</p>
  
  <p>However there is no directory called <code>RAGHAV~1</code>(I've enabled to see the hidden folders). In <code>php.ini</code> the <code>upload_tmp_dir</code> is set to <code>C:\xampp\tmp</code>.</p>
  
  <p>Is there any conflict between these settings? Can you please help me to get the file upload working?</p>
  
  <p>The code in the controller that process the uploaded files:</p>
  
  <pre class="lang-php prettyprint-override"><code>$validator = $this-&gt;brandValidator($request-&gt;all());
  
  if ($validator-&gt;fails()) {
      $this-&gt;throwValidationException(
          $request, $validator
      );
  }
  
  $image_directory = public_path() . '/Uploads/Products/';
  
  $result = $request-&gt;file('image')-&gt;move($image_directory);
  
  $brand_name = $request-&gt;input('brand_name');
  $image = $image_directory . $request-&gt;file('image')-&gt;getClientOriginalName();
  
  $id = Brand::create([
      'brand_name' =&gt; $brand_name,
      'image' =&gt; $image,
  ]);
  </code></pre>