PHPackages                             adolfoholzer/zitro-currency - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. adolfoholzer/zitro-currency

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

adolfoholzer/zitro-currency
===========================

Manejo de monedas para Laravel

v1.0.0(1mo ago)04MIT

Since Jul 6Compare

[ Source](https://github.com/adolfoholzer/zitro-currency)[ Packagist](https://packagist.org/packages/adolfoholzer/zitro-currency)[ RSS](/packages/adolfoholzer-zitro-currency/feed)WikiDiscussions Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Zitro Currency
==============

[](#zitro-currency)

[![PHP](https://camo.githubusercontent.com/50fef170ffb8fd714104ed85f6f9780a60176c9d8224507bce0450c3eea2aa4a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d373737424234)](https://camo.githubusercontent.com/50fef170ffb8fd714104ed85f6f9780a60176c9d8224507bce0450c3eea2aa4a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d373737424234)[![Laravel](https://camo.githubusercontent.com/096d33b304098579b8c6d63827fe33101879c0538513b2b279c1b2628d2f2f5e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d464632443230)](https://camo.githubusercontent.com/096d33b304098579b8c6d63827fe33101879c0538513b2b279c1b2628d2f2f5e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d464632443230)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)

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

Instead of scattering currency codes and symbols throughout your codebase, this package provides a single source of truth using a strongly typed enum and an easy-to-use service.

---

Features
--------

[](#features)

- 💰 Strongly typed `CurrencyType` enum
- 🌎 Centralized currency metadata
- ⚙️ Configurable default currency
- 🚀 Laravel Facade
- 🧪 Fully tested with Pest
- ❤️ Designed to be reused by other packages such as Billing, Payments and Invoicing

---

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 12+

---

Installation
------------

[](#installation)

Install the package via Composer.

```
composer require adolfoholzer/zitro-currency
```

Publish the configuration file.

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

---

Configuration
-------------

[](#configuration)

The published configuration file looks like this:

```
return [

    /*
    |--------------------------------------------------------------------------
    | Default Currency
    |--------------------------------------------------------------------------
    |
    | This currency will be returned by the CurrencyService whenever the
    | default currency is requested.
    |
    */

    'default' => 'UYU',

];
```

---

Usage
-----

[](#usage)

### Getting the default currency

[](#getting-the-default-currency)

```
use Zitro\Currency\Facades\ZitroCurrency;

$currency = ZitroCurrency::default();
```

---

### Using the enum

[](#using-the-enum)

```
use Zitro\Currency\Enums\CurrencyType;

$currency = CurrencyType::USD;
```

Example:

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

---

Examples
--------

[](#examples)

### Currency code

[](#currency-code)

```
CurrencyType::USD->code();

// USD
```

---

### Currency symbol

[](#currency-symbol)

```
CurrencyType::USD->symbol();

// $
```

---

### Comparing currencies

[](#comparing-currencies)

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

---

Available currencies
--------------------

[](#available-currencies)

The package currently supports the following currencies:

CurrencyISO CodeUruguayan PesoUYUUS DollarUSDEuroEUR> More currencies can easily be added by extending the `CurrencyType` enum.

---

Testing
-------

[](#testing)

Run the test suite.

```
./vendor/bin/pest
```

or

```
composer test
```

---

Why use this package?
---------------------

[](#why-use-this-package)

Without a centralized currency abstraction, applications often end up with code like this:

```
'$'
'USD'
```

spread throughout controllers, models and services.

Using this package instead:

```
CurrencyType::USD->symbol();
CurrencyType::USD->code();
```

makes your application easier to maintain, test and extend.

It also allows other packages (Billing, Payments, Invoices, etc.) to share exactly the same currency definitions.

---

Roadmap
-------

[](#roadmap)

- Localized currency names
- Number formatting helpers
- Money formatting

---

Contributing
------------

[](#contributing)

Contributions are welcome.

Please open an issue before submitting large changes so they can be discussed.

---

License
-------

[](#license)

This package is open-sourced software licensed under the MIT license.

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

49d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/603d3533e99e3af3578fb248fcca7988db02ea57a209275c7acc94258f3f82b6?d=identicon)[adolfoholzer](/maintainers/adolfoholzer)

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/adolfoholzer-zitro-currency/health.svg)

```
[![Health](https://phpackages.com/badges/adolfoholzer-zitro-currency/health.svg)](https://phpackages.com/packages/adolfoholzer-zitro-currency)
```

###  Alternatives

[illuminate/pagination

The Illuminate Pagination package.

12234.6M1.1k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9350.2M312](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.8M412](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

224.7M147](/packages/illuminate-cookie)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
