update: coupon generate default enable

This commit is contained in:
v2board 2023-03-22 01:45:07 +08:00
parent aa474f02b9
commit 82aa63b2e8

View File

@ -82,6 +82,7 @@ class CouponController extends Controller
$coupons = [];
$coupon = $request->validated();
$coupon['created_at'] = $coupon['updated_at'] = time();
$coupon['show'] = 1;
unset($coupon['generate_count']);
for ($i = 0;$i < $request->input('generate_count');$i++) {
$coupon['code'] = Helper::randomChar(8);