只要触发此方法,就不执行DB::transaction(function () use ($request)
中的代码
完整的代码在这里
DB::transaction(function () use ($request) {
$password = $request->password;
$tb = $this->userService->storeStudent($request);
try {
// Fire event to store Student information
if(event(new StudentInfoUpdateRequested($request,$tb->id))){
// Fire event to send welcome email
event(new UserRegistered($tb, $password));
} else {
throw new \Exeception('Event returned false');
}
} catch(\Exception $ex) {
Log::info('Email failed to send to this address: '.$tb->email.'\n'.$ex->getMessage());
}
});
我正在使用PostgreSQL。帮我解决这个问题