title: how to send data from ajax get method to controller in laravel?
body: <p>Proceed to booking
  on clicking the button i call the ajax function code below</p>
  
  <pre>$("#add_cart").click(function() 
      {$.ajax({
                url: 'roombooking',
                type: "get",
                data: {id:data},
                 success: function(response){ // What to do if we succeed
                if(data == "success")
                 alert(response); 
                 }
                 });
                });</pre>
  
  <p>Route</p>
  
  <pre>Route::post('roombooking','pagescontroller@roombooking');</pre>
  
  <p>Controller</p>
  
  <pre>public function roombooking($id,request $req)
      {
  
         $input = $req->all();
         return view ('pages.roombooking')->with('id',$id);
      }</pre>