Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 463 Bytes

default_currency.md

File metadata and controls

29 lines (18 loc) · 463 Bytes

Default currency

In order to get the default currency from the config file or override this value from the code.

Usage

// config/money.php

return [
    'default_currency' => 'RUB',

    // ...
];
use PostScripton\Money\Currency;

Currency::getDefault(); // RUB currency object

Currency::setDefault(currency('USD'));

Currency::getDefault(); // USD currency object

📌 Back to the contents.