fixing mail

This commit is contained in:
JokoPrasetio 2025-09-01 12:04:25 +07:00
parent 7937c1aa4c
commit e6e481ddf7
2 changed files with 12 additions and 2 deletions

View File

@ -317,7 +317,12 @@ class CustomerController extends Controller
}
//code...
if($order->email){
Mail::to($order->email)->send(new NotifikasiCustomer($order->nama_pemesan, $order->no_order, $order->total_harga));
try {
Mail::to($order->email)->send(new NotifikasiCustomer($order->nama_pemesan, $order->no_order, $order->total_harga));
} catch (\Throwable $th) {
//throw $th;
}
}
DB::connection('dbOrderGizi')->commit();
return response()->json([

View File

@ -122,7 +122,12 @@ class PesananController extends Controller
$order->update($payload);
if($order->email){
Mail::to($order->email)->send(new NotifikasiKonfirmasiPembayaran($order->nama_pemesan, $order->no_order, $order->total_harga));
try {
//code...
Mail::to($order->email)->send(new NotifikasiKonfirmasiPembayaran($order->nama_pemesan, $order->no_order, $order->total_harga));
} catch (\Throwable $th) {
//throw $th;
}
}
DB::connection('dbOrderGizi')->commit();