How to handle nested JSON object request in Laravel 5?
<p>We had this webservice running in Laravel 5 and AngularJs/Ionic for handling the web. When we post request from the web (client) to webservice (backend), we passed nested JSON object. We are having an issue to read all child objects under parent object in the server side.</p>

<pre><code>{
    "name": "test",
    "description": "test",
    "startdate": "2016-02-21T13:00:00.000Z",
    "enddate": "2016-02-23T13:00:00.000Z",
    "coach": {
        "uuid": "76fdd664-d830-11e5-9d46-00ffc9587cbc"
    },
    "category": {
        "uuid": "771e6de4-d830-11e5-9d46-00ffc9587cbc"
    },
    "useruuid": "76d65a2d-d830-11e5-9d46-00ffc9587cbc",
    "routines": ["775b2726-d830-11e5-9d46-00ffc9587cbc"]
}
</code></pre>

<p>This JSON has been verified ok and I also we managed to get the basic one such as name, endate etc etc BUT not the nested object one.</p>

<p>We are using something like this in Laravel 5:</p>

<pre><code>$incomingdata = $request-&gt;json()-&gt;all();
$name = $incomingdata-&gt;name; // works
$startdate = $incomingdata-&gt;startdate; // works
$coach_uuid = $incomingdata-&gt;coach()-&gt;uuid; // didn't work !!!
</code></pre>

<p>How do I achieve this?</p>