public getDiscount ( boolean $format = true ) : string | ||
$format | boolean | |
return | string |
public function getDiscount($format = true)
{
$amount = 0;
if (app('laracart')->findCoupon($this->code)) {
$amount = $this->discount;
}
return LaraCart::formatMoney($amount, $this->locale, $this->internationalFormat, $format);
}