1
0
Fork 0
mirror of https://github.com/archtechx/money.git synced 2025-12-12 03:14:03 +00:00
This commit is contained in:
Samuel Štancl 2021-11-16 21:06:45 +01:00
parent efe697b051
commit 5b7e3e118a

View file

@ -314,6 +314,20 @@ public function rate(): float
}
```
### Setting the default currency
You can set the [default currency](#default-currency) using the `setDefault()` method:
```php
currencies()->setDefault('USD');
```
### Setting the current currency
You can set the [current currency](#current-currency) using the `setCurrent()` method:
```php
currencies()->setCurrent('USD');
```
### Persisting a selected currency across requests
If your users can select the currency they want to see the app in, the package can automatically write the current currency to a persistent store of your choice, and read from that store on subsequent requests.