LukePOLO\LaraCart\Coupons\Percentage::discount PHP Метод

discount() публичный Метод

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
Результат string
    public function discount($throwErrors = false)
    {
        return LaraCart::formatMoney(app(LaraCart::SERVICE)->subTotal(false) * $this->value, null, null, false);
    }