diff --git a/app/Support/CurrencyFormatter.php b/app/Support/CurrencyFormatter.php new file mode 100644 index 0000000..7f1313d --- /dev/null +++ b/app/Support/CurrencyFormatter.php @@ -0,0 +1,45 @@ + max(0, (int) env('LOTTERY_DRAW_COOLDOWN_MINUTES', 15)), ], + + /* + | ui.format:API 中 *_formatted 展示用(由 {@see \App\Support\CurrencyFormatter} 读取) + */ + 'ui' => [ + 'format' => [ + 'currency' => [ + 'decimals' => max(0, min(12, (int) env('LOTTERY_CURRENCY_DISPLAY_DECIMALS', 2))), + 'decimal_separator' => env('LOTTERY_CURRENCY_DECIMAL_SEP', '.'), + 'thousands_separator' => env('LOTTERY_CURRENCY_THOUSANDS_SEP', ','), + ], + ], + ], ];