LukePOLO\LaraCart\Traits\CouponTrait::getMessage PHP Method

getMessage() public method

Get the reason why a coupon has failed to apply.
Deprecation: 1.3
public getMessage ( ) : string
return string
    public function getMessage()
    {
        try {
            $this->discount(true);
            return config('laracart.coupon_applied_message', 'Coupon Applied');
        } catch (CouponException $e) {
            return $e->getMessage();
        }
    }