fix in sync
This commit is contained in:
parent
f29d604e13
commit
f5ba2adfa7
@ -1705,9 +1705,9 @@ class PatientController extends Controller
|
||||
}
|
||||
public function planProductUpdateMultiple(Request $request)
|
||||
{
|
||||
$products = $request->input('products');
|
||||
$products = $request->input('body');
|
||||
|
||||
foreach ($products as $productData) {
|
||||
foreach ($products['products'] as $productData) {
|
||||
$product_id = $productData['product_id'];
|
||||
$product_name = $productData['product_name'];
|
||||
$product_slug = $productData['product_slug'];
|
||||
@ -1715,10 +1715,7 @@ class PatientController extends Controller
|
||||
$product_category = $productData['product_category'];
|
||||
$product_image = $productData['product_image'];
|
||||
|
||||
self::product_category($product_category,$product_id);
|
||||
|
||||
$plan = PlanV1::find($product_id);
|
||||
|
||||
if ($plan) {
|
||||
// Update existing product
|
||||
$plan->title = $product_name;
|
||||
@ -1744,6 +1741,7 @@ class PatientController extends Controller
|
||||
$plan->price = $product_price;
|
||||
$plan->save();
|
||||
}
|
||||
self::product_category($product_category,$product_id);
|
||||
}
|
||||
return response()->json(['message' => 'Products updated successfully']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user