fix: coupon generate

This commit is contained in:
tokumeikoi 2021-01-15 00:33:30 +09:00
parent 1ce019cfa5
commit 54d1226c8b

View File

@ -95,7 +95,9 @@ class CouponController extends Controller
{
$coupons = [];
$coupon = $request->validated();
if (isset($coupon['limit_plan_ids'])) {
$coupon['limit_plan_ids'] = json_encode($coupon['limit_plan_ids']);
}
$coupon['created_at'] = $coupon['updated_at'] = time();
unset($coupon['generate_count']);
for ($i = 0;$i < $request->input('generate_count');$i++) {