📅  最后修改于: 2022-03-11 14:53:47.681000             🧑  作者: Mango
foreach($request->input('pr_item') as $key => $value) {
$Record=new PurchaseRequestItemModel;
$Record->pr_form_number = $request->get('pr_number')[$key];
$Record->item_no = $request->get('pr_item')[$key];
$Record->pr_qty = $request->get('pr_qty')[$key];
$Record->pr_unit = $request->get('pr_unit')[$key];
$Record->pr_description =$request->get('pr_desc')[$key];
$Record->pr_cost_per_unit =$request->get('pr_cpu')[$key];
$Record->pr_estimated_cost =$request->get('pr_cpi')[$key];
$Record->save();
}