Back

Doubt about Lumen request and response


kalaivanan posted 6 months ago

Hi friends i created api using lumen this have request is ``` { "dates": [ { "date": "2014-08-24", "time": "150" }, { "date": "2014-08-24", "time": "165" }, { "date": "2014-08-24", "time": "180" } ] }

receive the request like

$job = json_decode($request->getContent(),true); foreach($job['dates'] as $date) { echo $date['date']; echo $date['time']; } i have doubt i do right or wrong


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us