title: Laravel: Send files via Ajax
body: <p>I'm trying to upload files using Ajax and Laravel, every time I try to upload one it returns empty. This is the method in Laravel:</p>
  
  <pre><code>public function save_vehicles(Request $request){
      $files=$request-&gt;file('input_file_vehicles');
      return response()-&gt;json(['File: '.$files]);
      \Log::info($files);
  }
  </code></pre>
  
  <p>And this is the Ajax function:</p>
  
  <pre><code>var save_vehicles=function(input_file){
    var formData = new FormData();
      formData.append("input_file_vehicles",input_file);
      return $.ajax({
          type: 'GET',
          dataType: 'json',
          processData: false,
          contentType:  false,
          data: formData,
          url: '/save/vehicles'
      });
  }
  </code></pre>
  
  <p>The result from this call is: </p>
  
  <blockquote>
    <p>"File: "</p>
  </blockquote>
  
  <p>It returns empty.</p>