error handling update pembayaran

parent 3e0d0d9d
......@@ -342,21 +342,29 @@ public function updatePembayaran(Request $request, $va)
], 200);
}
$registrasi = Registrasi::query()
->with('pkKegiatan', 'pkRegistrasiPeserta.rKegiatanPeserta', 'pkRegistrasiPeserta.rKonferensiPeserta')
->where('nomor_va', $va)
->update([
'tanggal_bayar' => Carbon::now()
]);
try{
$registrasi = Registrasi::query()
->with('pkKegiatan', 'pkRegistrasiPeserta.rKegiatanPeserta', 'pkRegistrasiPeserta.rKonferensiPeserta')
->where('nomor_va', $va)
->update([
'tanggal_bayar' => Carbon::now()
]);
$data = $this->getDataRegis($va);
$data = $this->getDataRegis($va);
SendMail::dispatch($data, 'email.selesai_pembayaran', $data['registrasi']->email, 'registrasi', 'email_pembayaran_sent_at');
SendMail::dispatch($data, 'email.selesai_pembayaran', $data['registrasi']->email, 'registrasi', 'email_pembayaran_sent_at');
return response([
'status' => 200,
'message' => 'success'
], 200);
return response([
'status' => 200,
'message' => 'success'
], 200);
}
catch(Exception $ex){
return response([
'status' => 404,
'message' => 'gagal mengupdate data'
], 200);
}
}
public function testEmail(Request $request)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment