我需要解析這個數據集我已經但我嘗試了幾種方法,但它不起作用。Laravel數據集解析錯誤
{"id":2,"area_id":"1","payment_term_id":"1","payment_type_id":"1","trade_channel_id":"1","salesman_id":1,"customer_name":"xxx","contact_number":"1231212","fax_number":"1231232","home_address":"asd","delivery_address":"dasd","email_address":"[email protected]","created_by":"4","updated_by":"4","is_active":"1","created_at":"2017-10-17 06:02:59","updated_at":"2017-10-17 06:13:22"}
我想這一個,但這個錯誤說
(1/1)ErrorException 試圖讓非對象的屬性
$details = $request->get('details');
return $details->id;
我也試過這個
$details = $request->get('details');
return $details['id'];
(1/1)ErrorException 非法字符串偏移'id '
我使用laravel 5.4
這工作感謝@alexey –