edededed;p;p;p;

This commit is contained in:
ilmedova 2022-04-07 00:50:19 +05:00
parent ec141f1c61
commit df6be8117c
1 changed files with 4 additions and 2 deletions

View File

@ -74,7 +74,7 @@ class BukjaController extends Controller
$data=json_decode($datas,true);
$bukjaOrder=new BukjaOrder();
foreach ($data as $val){
return response()->json($val);
if (isset($val['customer'])){
$customer=$val['customer'];
$customer_name=$customer['name'];
@ -86,6 +86,9 @@ class BukjaController extends Controller
$bukjaOrder->customer_phone=$customer_phone;
$bukjaOrder->customer_notes=$customer_notes;
}
}
return 'ok';
foreach ($data as $val){
if (isset($val['id'])){
$bukjaOrder=new BukjaOrder();
$bukjaOrder->customer_name=$customer_name;
@ -111,7 +114,6 @@ class BukjaController extends Controller
$bukjaOrder->total=$total;
$bukjaOrder->order_prop=$order_prop;
$bukjaOrder->save();
return response()->json($val);
$this->sendToMail($bukjaOrder);
}
}