Handeling JSON in Laravel controller
<p>I'm new to Laravel and kinda new to JQuery too so bear with me please.  So in one of my views I have a form :</p>

<pre><code>&lt;table id="tblAShip" class="report table table-condensed table-hover table-sorter"&gt;
&lt;thead class="no-sort"&gt;
    &lt;tr&gt;
        &lt;th&gt;Height&lt;/th&gt;
        &lt;th&gt;Width&lt;/th&gt;
        &lt;th&gt;Length&lt;/th&gt;
        &lt;th&gt;Weight&lt;/th&gt;
        &lt;th&gt;Create parcel&lt;/th&gt;
    &lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;input id="height" name="height" type="number" /&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input id="width" name="width" type="number" /&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input id="length" name="length" type="number" /&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input id="weight" name="weight" type="number" /&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input type="button" name ="creatShip" id="creatShip" value="Ajouter"&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;
</code></pre>

<p></p>

<p>Then this form is handled by a JS that makes an Ajax call</p>

<pre><code>function creerParcel(){
var docNum = $("#commandeNum").val();

var hei = $("#height").val();
var wid = $("#width").val();
var len = $("#length").val();
var wei = $("#weight").val();
$.ajax({
    type: "POST",
    url: "/EasyPostNetBanks/Shipment/"+docNum,
    contentType: "application/json; charset=utf-8",
    processData: false,
    data: {
        "Parcels":[{
            "length": len,
            "width": wid,
            "height": hei,
            "weight": wei }]
    },
    error: function(jqXHR, textStatus, errorThrown)
    {

    },
    success: function(data){
    }
});
</code></pre>

<p>then in my controller I try go retreive this data to create a shipment with the parcel information i got from my Ajax call</p>

<pre><code>foreach(\Input::get('Parcels') as $parcelInfo)
    {
        $parcel = $this-&gt;CreateParcel($parcelInfo);

        $shipment =  Shipment::create(array(
            "to_address" =&gt; $to,
            "reference"=&gt;$idCommande,
            "from_address" =&gt; $from,
            "parcel" =&gt; $parcel,
            "options" =&gt; array("label_format" =&gt; "ZPL")
        ));

        $ship = \Shipments::creer($shipment);
        $shipments[] =  $ship;
    }
</code></pre>

<p>but my \Input::get('Parcels') is always NULL\n.  How is it possible?  I've tried almost everything i could find online but to no avail so here I am (first post BTW. Hi all!).</p>