mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
fix: coupon generate
This commit is contained in:
parent
1ce019cfa5
commit
54d1226c8b
@ -95,7 +95,9 @@ class CouponController extends Controller
|
|||||||
{
|
{
|
||||||
$coupons = [];
|
$coupons = [];
|
||||||
$coupon = $request->validated();
|
$coupon = $request->validated();
|
||||||
|
if (isset($coupon['limit_plan_ids'])) {
|
||||||
$coupon['limit_plan_ids'] = json_encode($coupon['limit_plan_ids']);
|
$coupon['limit_plan_ids'] = json_encode($coupon['limit_plan_ids']);
|
||||||
|
}
|
||||||
$coupon['created_at'] = $coupon['updated_at'] = time();
|
$coupon['created_at'] = $coupon['updated_at'] = time();
|
||||||
unset($coupon['generate_count']);
|
unset($coupon['generate_count']);
|
||||||
for ($i = 0;$i < $request->input('generate_count');$i++) {
|
for ($i = 0;$i < $request->input('generate_count');$i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user