update: add coupon and notice switch

This commit is contained in:
tokumeikoi
2022-01-22 02:30:05 +08:00
parent 94a7ab412c
commit 1790de63f6
8 changed files with 55 additions and 4 deletions

View File

@ -81,7 +81,7 @@ class CouponService
public function check()
{
if (!$this->coupon) {
if (!$this->coupon || !$this->coupon->show) {
abort(500, __('Invalid coupon'));
}
if ($this->coupon->limit_use <= 0 && $this->coupon->limit_use !== NULL) {