title: AJAX returning 404 Not Found in Laravel
body: <p>This is my route and I want to post the data through ajax but it gives me the 404 not found error</p>
  
  <pre><code>Route::post('{req_id}/com/{id}','CompanyController@store');
  </code></pre>
  
  <p>This is my Ajax code in view</p>
  
  <pre><code> $('#body_tb tr td a').click(function () {
  
          var id = $(this).attr('id');
          var req_id = {{$req_id}}
  
          $.ajax({
  
              type:"POST",
              url :req_id+"/com/"+id,
  
              data :{
                  _token: "{{csrf_token()}}",
                  company_id : id,
                  req : req_id
              },
              success: function(data) {
  
              }
  
          });
  
      });
  </code></pre>
  
  <p>This is Controller</p>
  
  <pre><code> public function store($id)
  {
  
      print_r($_POST);
      exit();
  </code></pre>