fix elq update try catch

This commit is contained in:
Tokumeikoi
2020-03-17 14:28:47 +08:00
parent 7bb4852cca
commit 96f562a9e7
8 changed files with 33 additions and 12 deletions

View File

@ -34,7 +34,9 @@ class CouponController extends Controller
abort(500, '创建失败');
}
} else {
if (!Coupon::find($request->input('id'))->update($params)) {
try {
Coupon::find($request->input('id'))->update($params);
} catch (\Exception $e) {
abort(500, '保存失败');
}
}