title: Sending JS array via AJAX to laravel not working
body: <p>I have a javascript array which I want to send to a controller via an ajax get method.</p>
  
  <p>My javascript looks like this:</p>
  
  <pre><code>    var requestData = JSON.stringify(commentsArray);
  
      console.log(requestData);
      //logs correct json object
      var request;
  
      request = $.ajax({
          url: "/api/comments",
          method: "GET",
          dataType: "json",
          data: requestData
      });
  </code></pre>
  
  <p>I can tell that my <code>requestData</code> is good because I am logging it and it looks right.</p>
  
  <p>and the controller is being accessed correctly (i know this because I can log info there and I can return a response which I can log in my view after the response is returned).</p>
  
  <p>when trying to access <code>requestData</code> I am getting an empty array.</p>
  
  <p>My controller function that is called looks like:</p>
  
  <pre><code>public function index(Request $request)
      {
  
          Log::info($request);
          //returns array (
          //)
          //i.e. an empty array
          Log::info($request-&gt;input);
          //returns ""
          Log::info($_GET['data']);
          //returns error  with message 'Undefined index: data '
          Log::info(Input::all());
          //returns empty array
  
          return Response::json(\App\Comment::get());
      }
  </code></pre>
  
  <p>And I am getting back the response fine.</p>
  
  <p>How can I access the <code>requestData</code>?</p>