title: Error with POST ajax during image upload with dropzone
body: <p>I have a form,where I included the dropzone.js. The plugin its working till preview image,after I get a POST error:<code>500 (Internal Server Error)</code> on <code>dropzone.js:1386</code></p>
  
  <pre><code>Dropzone.prototype.submitRequest = function(xhr, formData, files) {
        return xhr.send(formData);&lt;--here
      }; 
  </code></pre>
  
  <p>My view:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Dropzone.options.images = false;
   $("#images").dropzone({ 
    url: "{{url('/')}}/ajax-uploadvehicleimage",
    paramName: "file",
    maxFiles: 10,
      maxfilesexceeded: function(file) {
          this.removeFile(file);
          alert('you no have more picture avaible! Pay for more here');
      },
       error: function(file, response) {
          if($.type(response) === "string")
              var message = response; //dropzone sends it's own error messages in string
          else
              var message = response.message;
        
          file.previewElement.classList.add("dz-error");
          _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]");
          _results = [];
          for (_i = 0, _len = _ref.length; _i &lt; _len; _i++) {
              node = _ref[_i];
              _results.push(node.textContent = message);
          }
  
          return _results;
      },
       success: function(file,done) {
         alert(done);
      }
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="images" class="dropzone"&gt;
   &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The route:</p>
  
  <pre><code>Route::post('/ajax-uploadvehicleimage','VehicleAddController@uploadimg');
  </code></pre>
  
  <p>The controller:</p>
  
  <pre><code>public function uploadimg(){
           if (Request::hasFile('file'))
      {
          //houston we have a file!
          $file = Request::file('file');
  
          //move it to our public folder and rename it to $name
          Request::file('file')-&gt;move('images', 'insert_file_name.'.$file-&gt;getClientOriginalExtension());
          echo 'file uploaded!';
          var_dump($file);
      }else{
          echo 'no file, no bueno';
      }
      }
  </code></pre>
  
  <p>Can explain me whats the problem,and how can I change it or sample? I read a lot of topic about that but no one is releasd!</p>
  
  <p>EDIT:
  Laravel.log:</p>
  
  <pre><code>[2017-01-13 07:55:38] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Can't use function return value in write context' in E:\bitnami\apache2\htdocs\vehicle\app\Http\Controllers\VehicleAddController.php:103
  Stack trace:
  #0 {main}  
  </code></pre>