title: Laravel TokenMismatchException and dropzone
body: <p>I'm trying to upload pictures via dropzone, but I get tokenmismatch error even tho I added csrf token everywhere needed, i'm getting quite desperate...</p>
  
  <p><strong>My form</strong></p>
  
  <pre><code>{!! Form::open(['route' =&gt; 'photo.upload', 'id' =&gt; 'hello', 'method' =&gt; 'POST', 'class' =&gt; 'dropzone no-margin dz-clickable']) !!}
      &lt;div class="dz-default dz-message"&gt;&lt;span&gt;Drop files here to upload&lt;/span&gt;&lt;/div&gt;&lt;/form&gt;
  {!! Form::close() !!}
  </code></pre>
  
  <p><strong>my script</strong></p>
  
  <pre><code>Dropzone.autoDiscover = false;
  
  Dropzone.options.hello = {
      paramName: "file", // The name that will be used to transfer the file
      maxFilesize: 5, // MB
      parallelUploads: 2, //limits number of files processed to reduce stress on server
      addRemoveLinks: true,
      headers: {
          'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
      },
      accept: function(file, done) {
          // TODO: Image upload validation
          done();
      },
      sending: function(file, xhr, formData) {
  
          // Pass token. You can use the same method to pass any other values as well such as a id to associate the image with for example.
          formData.append("_token", $('input[name="_token"]').val() ); // Laravel expect the token post value to be named _token by default
      },
      init: function() {
          this.on("success", function(file, response) {
              // On successful upload do whatever :-)
          });
      }
  };
  
  // Manually init dropzone on our element.
  var myDropzone = new Dropzone("#hello", {
      url: $('#hello').attr('action')
  });
  </code></pre>
  
  <p><strong>Request headers</strong></p>
  
  <pre><code>...
  X-CSRF-Token:P4wc9NVVZJe1VjalPwO6d6WQXZ9eEqPd84ICpToG
  ...
  </code></pre>
  
  <p><strong>Request Payload</strong></p>
  
  <pre><code>------WebKitFormBoundarySKMUFNO6dbgzeQVK
  Content-Disposition: form-data; name="_token"
  
  P4wc9NVVZJe1VjalPwO6d6WQXZ9eEqPd84ICpToG
  ------WebKitFormBoundarySKMUFNO6dbgzeQVK
  Content-Disposition: form-data; name="_token"
  
  P4wc9NVVZJe1VjalPwO6d6WQXZ9eEqPd84ICpToG
  ------WebKitFormBoundarySKMUFNO6dbgzeQVK
  Content-Disposition: form-data; name="file"; filename="Screen Shot 2016-01-14 at 18.27.40.png"
  Content-Type: image/png
  
  
  ------WebKitFormBoundarySKMUFNO6dbgzeQVK--
  </code></pre>
  
  <p>and When I look in the generated form THERE IS the csrf field</p>
  
  <pre><code>&lt;input name="_token" type="hidden" value="P4wc9NVVZJe1VjalPwO6d6WQXZ9eEqPd84ICpToG"&gt;
  </code></pre>
  
  <p>Do you have any idea why it's not working even when I put crsf token where I should?</p>
  
  <p>thank you for your time.</p>