0๐
You need to format your $data
to be like this.
[
[
'property_type_id' => 2,
'fee_amount' => "123"
],
[
'property_type_id' => 1,
'fee_amount' => "1312"
],
]
0๐
In this case, if the data structure of the $request->feeByPropertyType
data structure matches with the database tables structure, then you can simply use DB
facade to insert multiple rows at once.
DB::insert($request->feeByPropertyType);
- [Vuejs]-Computed Prop or Data to pass to style binding for Backgound Image
- [Vuejs]-Using commit in actions with promises returns 'Getters & Setters'
Source:stackexchange.com