adolfoholzer/currency

A lightweight Laravel package that centralizes currency definitions across your applications.

Maintainers

Package info

github.com/adolfoholzer/currency

pkg:composer/adolfoholzer/currency

Transparency log

Fund package maintenance!

adolfoholzer

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-12 00:03 UTC

This package is not auto-updated.

Last update: 2026-08-12 23:34:30 UTC


README

Currency

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Total Downloads

A lightweight Laravel package that centralizes currency definitions across your applications.

Installation

You can install the package via Composer:

composer require adolfoholzer/currency

You may publish all of the package's resources at once:

php artisan vendor:publish --tag="currency"

Or, you may publish each resource individually:

Publishing the Configuration File

php artisan vendor:publish --tag="currency-config"

Usage

Getting the default currency

use Zitro\Currency\Facades\Currency;

$currency = Currency::default();

Using the enum

use Zitro\Currency\Enums\CurrencyType;

$currency = CurrencyType::USD;

Example:

$currency->code();
$currency->symbol();

Examples

Currency code

CurrencyType::USD->code();

// USD

Currency symbol

CurrencyType::USD->symbol();

// $

Comparing currencies

if ($currency === CurrencyType::USD) {
    //
}

Available currencies

The package currently supports the following currencies:

Currency ISO Code
Uruguayan Peso UYU
US Dollar USD
Euro EUR

More currencies can easily be added by extending the CurrencyType enum.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Currency! Please review our contributing guide to get started.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

Currency is open-sourced software licensed under the MIT license.