This commit is contained in:
Joel Male
2024-08-16 15:30:57 +10:00
parent d48f54cf16
commit 66fd4c9099
2 changed files with 34 additions and 1 deletions
+33
View File
@@ -43,6 +43,39 @@ ## Configuration
php artisan vendor:publish --provider="Wearepixel\Cart\CartServiceProvider" --tag="config"
```
### Formatting Numbers
The package by default does not use round to format numbers, and instead returns the number using floatval().
If you'd prefer this number to be rounded, you can customize the formatting in the configuration file.
Defaults to false.
```php
'format_numbers' => env('LARAVEL_CART_FORMAT_VALUES', false),
'round_mode' => env('LARAVEL_CART_ROUND_MODE', 'down'),
```
### Decimals
You can customize the number of decimals in the configuration file.
Defaults to 2.
```php
'decimals' => env('LARAVEL_CART_DECIMALS', 2),
```
### Round Mode
The package uses the `round` function to round the prices. You can customize the rounding mode in the configuration file.
Defaults to `down`.
```php
'round_mode' => env('LARAVEL_CART_ROUND_MODE', 'down'),
```
## HOW TO USE
- [Usage](#usage)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "wearepixel/laravel-cart",
"version": "1.0.0",
"version": "1.0.1",
"description": "A cart implementation for Laravel",
"keywords": [
"laravel",