LukePOLO\LaraCart\Tests\Coupons\Fixed::discount PHP Méthode

discount() public méthode

Gets the discount amount.
public discount ( $throwErrors = false ) : string
$throwErrors boolean this allows us to capture errors in our code if we wish, that way we can spit out why the coupon has failed
Résultat string
    public function discount($throwErrors = false)
    {
        throw new CouponException('Sorry, you must have at least 100 dollars!');
    }