title: Decode laravel 4 Input::json()
body: <p>I am having a hard time decoding json input in laravel .. am building a Restful API and when i send post data using RestClient and then die and dump in laravel i got </p>
  
  <pre><code>object(Symfony\Component\HttpFoundation\ParameterBag)#205 (1) {
    ["parameters":protected]=&gt;
    array(6) {
      ["firstName"]=&gt;
      string(8) "John"
      ["lastName"]=&gt;
      string(7) "Doe"
      ["bloodGroup"]=&gt;
      string(2) "B+"
      ["phone"]=&gt;
      string(8) "+9999999"
      ["address"]=&gt;
      string(8) "Somecity"
      ["symptoms"]=&gt;
      string(3) "Bla"
    }
  }
  </code></pre>
  
  <p>Now i have tied to access the data using </p>
  
  <pre><code>$data = Input::json();
  echo $data-&gt;firstName;
  </code></pre>
  
  <p>that does not work .. tried to convert it to array and then access 
  like <code>$data['firstName']</code> does not work .</p>
  
  <pre><code>array(1) {
    ["*parameters"] =&gt;
    array(6) {
      ["firstName"]=&gt;
      string(8) "John"
      ["lastName"]=&gt;
      string(7) "Doe"
      ["bloodGroup"]=&gt;
      string(2) "B+"
      ["phone"]=&gt;
      string(8) "+9999999"
      ["address"]=&gt;
      string(8) "Somecity"
      ["symptoms"]=&gt;
      string(3) "Bla"
    }
  }
  </code></pre>
  
  <p>i want to decode the data then save it to db, Here is a tutorial building similar App ..</p>
  
  <p>I have tried the post_index() method explained here but no luck .</p>
  
  <p><a href="http://maxoffsky.com/maxoffsky-blog/building-restful-api-in-laravel-part-2-design-api-controller/" rel="noreferrer">http://maxoffsky.com/maxoffsky-blog/building-restful-api-in-laravel-part-2-design-api-controller/</a></p>