The class Currencies
is used in order to operate over a collection of currencies.
Get all the chosen (current) currencies.
Returns: Illuminate\Support\Collection
Returns: array
as ["USD", "EUR", ...]
use PostScripton\Money\Currencies;
Currencies::get(); // Collection of currencies
Currencies::getCodesArray(); // ["USD", "EUR", ...]
Returns: bool
use PostScripton\Money\Currencies;
// Always true because <= 1 elements
Currencies::same(); // true
Currencies::same(currency('USD')); // true
Currencies::same('USD', currency('USD')); // true
Currencies::same(currency('USD'), 'USD', 'RUB'); // false
📌 Back to the contents.