You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1425,6 +1427,32 @@ The `Number::withLocale` method executes the given closure using the specified l
1425
1427
return Number::format(1500);
1426
1428
});
1427
1429
1430
+
<aname="method-number-use-currency"></a>
1431
+
#### `Number::useCurrency()` {.collection-method}
1432
+
1433
+
The `Number::useCurrency` method sets the default number currency globally, which affects how the currency is formatted by subsequent invocations to the `Number` class's methods:
The `Number::withCurrency` method executes the given closure using the specified currency and then restores the original currency after the callback has executed:
1449
+
1450
+
use Illuminate\Support\Number;
1451
+
1452
+
$number = Number::withCurrency('GBP', function () {
0 commit comments