title: 500 in POST request
body: <p>I am building edit post system using jquery  and ajax in laravel 5.2.
  When i click on save changes button in my bootstrap modal, the following error is displayed:</p>
  
  <blockquote>
  <pre><code>Error: POST http://localhost:8000/edit 500 (Internal Server Error)
  
  send @ jquery-1.12.0.min.js:4
  
  ajax @ jquery-1.12.0.min.js:4
  
  (anonymous function) @ myplace.js:24
  
  dispatch @ jquery-1.12.0.min.js:3
  
  r.handle @ jquery-1.12.0.min.js:3
  </code></pre>
  </blockquote>
  
  <p><strong>js code</strong>:</p>
  
  <pre><code>$('#modal-save').on('click' , function() {
  
  $.ajax({
  
      method : 'POST' ,
      url : url ,
      data: { body: $('#post-body').val(), postid: '' , _token: token }})
  
  .done(function(msg) {
  
      console.log(msg['message']);
  
  });});
  </code></pre>
  
  <p>included in my <strong>view file</strong>:</p>
  
  <pre><code>&lt;script&gt;
  var token='{{ Session::token() }}';
  var url='{{  route('edit') }}' ;
  &lt;/script&gt;
  </code></pre>