【发布时间】:2020-10-10 18:00:12
【问题描述】:
$json = file_get_contents('php://input');
// Decode the received JSON and store into $obj
$obj = json_decode($json,true);
foreach($obj as $product){
$product_id = $product['product_id'];
$data=array("product_id"=>$product_id);
DB::table('order_products')->insert($data);
}
【问题讨论】:
标签: php json associative