title: how to get url value from arduino using ajax and laravel?
body: <p>this is my url value from arduino
  request_string = &quot;http://127.0.0.1:8000/monitoring/x/?x=1&quot;;</p>
  <p>i have problem when try to catching the value using url in ajax</p>
  <pre><code>$.ajax({
          type:'get',
          url:'http://127.0.0.1:8000/monitoring/x/',
          dataType: &quot;json&quot;,
          success:function(response){
            if (response.data==0) {
  
               var img = document.getElementById(&quot;kursi7&quot;);
               img.src=&quot;{{asset('/assets/images/kursi.jpg')}}&quot;;
              document.getElementById('lokasi'+1).innerHTML=(&quot;TIDAK ADA ORANG&quot;);
            }else {
              // location.reload();
              var img = document.getElementById(&quot;kursi7&quot;);
              img.src=&quot;{{asset('/assets/images/kursi_booked.jpg')}}&quot;;
              document.getElementById('lokasi'+1).innerHTML=(&quot;ADA ORANG&quot;);
            }
          }
          });
  </code></pre>
  <p>and processing in php (laravel)
  i have some error undefined variable x when try to get the data $_GET['x'] from passing value url in arduino</p>
  <pre><code>public function data(Request $req, $x)
  {
    $x=$_GET['x'];
    
    return response()-&gt;json($x);
  }
  </code></pre>
  <p>i hope someone can help and give me an information abt this.
  thanks a lot mate</p>