test no email

This commit is contained in:
ilmedova 2022-04-07 00:30:36 +05:00
parent 577fbe6398
commit ec141f1c61
1 changed files with 2 additions and 3 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,8 +86,6 @@ class BukjaController extends Controller
$bukjaOrder->customer_phone=$customer_phone;
$bukjaOrder->customer_notes=$customer_notes;
}
}
foreach ($data as $val){
if (isset($val['id'])){
$bukjaOrder=new BukjaOrder();
$bukjaOrder->customer_name=$customer_name;
@ -113,6 +111,7 @@ class BukjaController extends Controller
$bukjaOrder->total=$total;
$bukjaOrder->order_prop=$order_prop;
$bukjaOrder->save();
return response()->json($val);
$this->sendToMail($bukjaOrder);
}
}