title: How to post data into a laravel controller method using jQuery
body: <p>My purpose is : <br /></p>
  
  <ol>
  <li>Getting clicked button's id <br/></li>
  <li>Post this id number to a controller's method. <br /></li>
  </ol>
  
  <p>Note that my routes are working nice. But when i try to pass data, i am having problems.</p>
  
  <p>Here is jQuery :</p>
  
  <pre><code>$.ajax({
              type: "POST",
              url : "myRouteURL",
              data: (jQuery(this).attr("id"))
          });
  </code></pre>
  
  <p>Here is my controller's method :</p>
  
  <pre><code>public function somethingSpecial($passedData){
     DB::table('myTableName')-&gt;where('fieldName', '=', $passedData)-&gt;delete();
  }
  </code></pre>
  
  <p>Thanks in advance.</p>