title: TinyMCE and Laravel 5.3 TokenMismatchException
body: <p>I'm trying to implement TinyMCE image uploads, using Laravel 5.3 on the server side:</p>
  
  <p>here is my JS for TinyMCE, which is currently in a blade template:</p>
  
  <pre><code>&lt;script src="{{ URL::to("/tinymce/tinymce.min.js") }}"&gt;&lt;/script&gt;
  &lt;script&gt;
      tinymce.init({
          selector: 'textarea',
          plugins: [
              "advlist autolink lists link image charmap print preview hr anchor pagebreak",
              "searchreplace wordcount visualblocks visualchars code fullscreen",
              "insertdatetime media nonbreaking save table contextmenu directionality",
              "emoticons template paste textcolor colorpicker textpattern"
          ],
          toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
          relative_urls: false,
  
          image_title: true,
  
          automatic_uploads: true,
  
          images_upload_url: '/discussions/save_images/',
  
          file_picker_types: 'image',
  
          images_upload_credentials: true,
  
          file_picker_callback: function(cb, value, meta) {
              var input = document.createElement('input');
              input.setAttribute('type', 'file');
              input.setAttribute('accept', 'image/*');
              input.onchange = function() {
                  var file = this.files[0];
                  var id = 'blobid' + (new Date()).getTime();
                  var blobCache = tinymce.activeEditor.editorUpload.blobCache;
                  var blobInfo = blobCache.create(id, file);
                  blobCache.add(blobInfo);
                  cb(blobInfo.blobUri(), { title: file.name });
              };
              input.click();
          }
      });
  &lt;/script&gt;﻿
  </code></pre>
  
  <p>My route to handle the POST request made by TinyMCE:</p>
  
  <pre><code>Route::post("/discussions/save_images/", 'Discussion\DiscussionController@saveImages');
  </code></pre>
  
  <p>My action to handle each upload:</p>
  
  <pre><code>public function saveImages(Request $request) {
      $filename = sha1(uniqid()).'.'.request()-&gt;file("name")-&gt;getClientOriginalExtension();
      $request-&gt;file("name")-&gt;move('/images/discussions/', $filename);
      return json_encode(["location"=&gt;"/images/discussions/".$filename]);
  }
  </code></pre>
  
  <p>Laravel throws a TokenMismatchException. How can I pass the CSRF token into the POST request that TinyMCE makes?</p>
  
  <p>I know that in general this token can be accessed in a template via <code>{{ csrf_token }}</code>, but I'm not sure about the correct configuration in regards to TinyMCE.</p>