getSellingPrice()->convertToCurrentCurrency()->format(); $flashSalePrice = FlashSale::pivot($product)->price->convertToCurrentCurrency()->format(); if (is_callable($callback)) { return $callback($flashSalePrice, $previousPrice); } return "{$flashSalePrice} {$previousPrice}"; } $price = $product->price->convertToCurrentCurrency()->format(); $specialPrice = $product->getSpecialPrice()->convertToCurrentCurrency()->format(); if (is_callable($callback)) { return $callback($price, $specialPrice); } if (! $product->hasSpecialPrice()) { return $price; } return "{$specialPrice} {$price}"; } }