Reputation: 1
Previous Code
$product->selling_price
Result 1.1000
I tried
({{ ceil($product->selling_price) }})
1
I want 1.100 (for Kuwait dinar)
Upvotes: 0
Views: 1473
Reputation: 389
Try This One: I have solved using this:
number_format((float)$product->payable_amount, 2,)
Upvotes: 0
Reputation: 15319
You can use number_format
number_format((float)$product->selling_price, 3, '.')
PHP official documentation
number_format ( float $num , int $decimals = 0 , string|null $decimal_separator = "." , string|null $thousands_separator = "," ) : string
Formats a number with grouped thousands and optionally decimal digits.
Ref:https://www.php.net/manual/en/function.number-format.php
Upvotes: 1