title: AJAX POST to controller not working in laravel
body: <p>I am trying to post post an id to one of my controllers and what I have is not working and I don't know why :</p>
  
  <p>Route : </p>
  
  <pre><code> Route::post('/save-book','UploadController@save_book')-&gt;name('savebk');
  </code></pre>
  
  <p>Controller : </p>
  
  <pre><code>public function save_book(Request $request)
      {
  
          dd($request-&gt;all());
  
      }
  </code></pre>
  
  <p>In the view :</p>
  
  <pre><code>&lt;a id="bksv" data-value="{{$uploads[0]-&gt;id}}" href="" &gt;Save it!&lt;/a&gt;
  </code></pre>
  
  <p>jquery : </p>
  
  <pre><code>$(document).ready(function() {
     $("#svd").click(function(e){
           var data = $("#bksv").data().value;
           console.log(data);
  
           $.ajax({
               url: 'save-book',
               data: {'id': data},
               type: 'POST',
               datatype: 'JSON',
               success: function (response) {
  
               },
               error: function (response) {
  
               }
           });
  
       });
    });
  </code></pre>
  
  <p>Can someone help troubleshoot? I don't know what is wrong in what I have.
  I think that what I want to achieve is obvious.
  In the controller I have a database query, which I deleted for this question.</p>
  
  <p>The problem is : when I click the <code>&lt;a&gt;</code> tag basically nothing happens apart from the <code>value</code> being console logged.</p>