mirror of
https://github.com/v2board/v2board.git
synced 2025-06-12 12:37:54 +08:00
update: fix coupon
This commit is contained in:
@ -17,7 +17,7 @@ class CouponService
|
||||
$this->coupon = Coupon::where('code', $code)->first();
|
||||
}
|
||||
|
||||
public function use(Order $order)
|
||||
public function use(Order $order):bool
|
||||
{
|
||||
$this->setPlanId($order->plan_id);
|
||||
$this->setUserId($order->user_id);
|
||||
@ -59,7 +59,7 @@ class CouponService
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
public function checkLimitUseWithUser()
|
||||
public function checkLimitUseWithUser():bool
|
||||
{
|
||||
$usedCount = Order::where('coupon_id', $this->coupon->id)
|
||||
->where('user_id', $this->userId)
|
||||
|
Reference in New Issue
Block a user