Docs / Laravel Cart / Configuration

Configuration

You can publish the configuration file to customize various options.

php artisan vendor:publish --provider="Wearepixel\Cart\CartServiceProvider" --tag="cart-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.

'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.

'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.

'round_mode' => env('LARAVEL_CART_ROUND_MODE', 'down'),
Discovery Call

One call.
We'll both know.

An hour to walk through your project, ask the hard questions, and work out honestly if we're the right team for it.

  • One call per day - it gets our full attention
  • Australia's only Laravel Premier Partner
  • Senior engineers only - no juniors on your project
  • Brisbane-based, onshore team

Press Esc to close  ·  B to reopen