title: Laravel PHP5 Input:All() Malformed Array With Undefined Offset
body: <p>really simple question/task just have some sort of error somewhere that I can't figure out.</p>
  
  <p>So I am trying to do a post request from a chrome extension (using jquery <code>$.ajax</code>) to a Laravel application.</p>
  
  <p>Everything works except Laravel is not handling <code>POST</code> request payload well.</p>
  
  <p>My ajax:</p>
  
  <pre><code> $.ajax
      ({
          type: "POST",
          url: 'https://old.example.com/data',
          dataType: 'json',
          //json object below
          data: arrayofproductsandthereassociates,
          success: function () {
    console.log(date);
  </code></pre>
  
  <p><code>arrayofproductsandthereassociates</code> is populated, looks like this:</p>
  
  <pre><code>var arrayofproductsandthereassociates  = JSON.stringify({"Date":date,"Item":itemName,"Sold":sold,"Void":v0id,"Comp":comp,"Price":price,"Cost":cost,"Gross":gross,"Comps":comps,"Total Tax":totaltax,"Net":net,"Gross Proft":grossprofit,"Category":category});
  </code></pre>
  
  <p>When Laravel gets this payload using this controller code:</p>
  
  <pre><code>           $input = Input::all();
             print_r($input);
             $itemz = json_decode($input[0]);
             $model = new DATA;
             foreach($itemz as $key =&gt; $value) 
             {
             $model-&gt;$key = $value;      
             }
             $model-save();
             return;
  </code></pre>
  
  <p>It errors on the <code>json_decode($input[0]);</code> line, saying undefined offset.</p>
  
  <p>The array looks all messed up at the <code>print_r()</code></p>
  
  <p>Output:</p>
  
  <blockquote>
    <p>Array ( [{"Date":"09-28-2016","Item":"Reuben_Hot","Sold":"1","Void":"0","Comp":"0","Price":"$2_35","Cost":"$0_00","Gross":"$2_79","Comps":"$0_00","Total_Tax":"$0_44","Net":"$2_35","Gross_Proft":"$2_35","Category":"Soups_] => [Sandwiches"}] => )</p>
  </blockquote>
  
  <p>How do I solve this? My sense is that the unmatched <code>=&gt;</code> in the array is the reason why I have an undefined offset? But how do I fix that?</p>
  
  <p>Thank you!</p>