1

如何在 Laravel 函数中使用“NumberFormatter”?

我的代码是(我需要将数字转换为 Word)例如:999 就像“九百九十九”

$digit = new NumberFormatter("en", NumberFormatter::SPELLOUT); 
echo $digit->format(1000);

它给出的错误如下:

"message": "Class 'Modules\\Receipts\\Http\\Controllers\\NumberFormatter' not found",
"exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError",

如何解决这个问题?

4

1 回答 1

3
sudo apt-get install php-intl
service apache2 restart
于 2019-10-22T11:35:17.130 回答