PHPackages                             vormia-folks/atu-multi-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. [Payment Processing](/categories/payments)
4. /
5. vormia-folks/atu-multi-currency

ActiveLibrary[Payment Processing](/categories/payments)

vormia-folks/atu-multi-currency
===============================

ATU Multi Currency - A package for Laravel that provides multi currency support for your e-commerce website.

v2.1.3(1mo ago)0185MITPHPPHP ^8.2

Since Jan 8Pushed 1mo agoCompare

[ Source](https://github.com/vormia-folks/atu-multi-currency)[ Packagist](https://packagist.org/packages/vormia-folks/atu-multi-currency)[ RSS](/packages/vormia-folks-atu-multi-currency/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (8)Versions (16)Used By (0)

ATU Multi-Currency
==================

[](#atu-multi-currency)

Laravel package for currency normalization, conversion, display, and reporting alongside A2 Commerce. Core commerce data stays in the **base system currency**; this package adds rates, logs, settings, and APIs without replacing A2 as the source of truth.

Introduction
------------

[](#introduction)

ATU Multi-Currency is a **projection layer**: it converts and decorates for display and reporting, keeps an audit trail, and syncs optional settings with A2Commerce when that stack is present.

**A2 Commerce owns truth** — amounts in A2Commerce stay in base currency. ATU owns `atu_multicurrency_*` tables, conversion logs, and admin/API surfaces.

**How the package is wired (v2.x)** — After `composer require`, Laravel loads **migrations, merged config, API routes, and admin Livewire routes** directly from the package under `vendor` (`livewire/livewire` ^4 is required). The installer **does not copy** migrations, controllers, or views into your app; it mainly ensures `.env` keys and walks you through migrate/seed.

Features
--------

[](#features)

- **Currency management** — Multiple currencies, manual or automatic rates, optional fees
- **Flexible codes** — 3–4 character currency codes (ISO-style), optional display names
- **Smart fallbacks** — Empty code or symbol falls back to the other when appropriate
- **Conversion logging** — Immutable conversion audit rows
- **Rate history** — Historical exchange rates
- **Settings storage** — Database-backed settings (configurable via `ATU_CURRENCY_SETTINGS_SOURCE`)
- **A2Commerce integration** — Optional read/sync of base currency via `a2_ec_settings` (key/value rows)
- **JSON API** — Registered under `/api/atu/currency`
- **Admin UI** — Livewire 4 full-page components served from the package
- **Artisan tooling** — Install, refresh, uninstall, UI checks, and help

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

[](#requirements)

- PHP 8.2+
- Laravel 12.x or 13.x
- [Vormia](https://github.com/vormiaphp/vormia) 5.x (install in your app first)

### Optional (Flux admin shell)

[](#optional-flux-admin-shell)

- `vormiaphp/ui-livewireflux-admin` — required by `atumulticurrency:ui-install` for layout compatibility checks
- `livewire/flux` — optional; use `ui-install --inject-sidebar` to merge menu snippets

`livewire/livewire` **^4** is required by this package (declared in `composer.json`). See `composer.json` `suggest` for optional Flux-related packages.

Dependencies
------------

[](#dependencies)

- **livewire/livewire** (required, ^4) — Admin UI routes and single-file components
- **vormiaphp/vormia** (required) — Users, taxonomies, and related infrastructure

**A2Commerce** is optional. If `a2_ec_settings` exists, the seeder and sync services can align the default currency with A2; otherwise defaults apply (for example USD).

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

[](#installation)

### 1. Require the package

[](#1-require-the-package)

```
composer require vormia-folks/atu-multi-currency
```

The service provider is discovered automatically.

### 2. Run the installer (optional `.env`, migrate, seed)

[](#2-run-the-installer-optional-env-migrate-seed)

```
php artisan atumulticurrency:install
```

This command:

- Appends missing **ATU Multi-Currency** keys to `.env` and `.env.example` (unless `--skip-env`)
- Explains that **routes, config, migrations, and Livewire views load from vendor**
- Prompts to run `php artisan migrate` (package migrations are loaded via `loadMigrationsFrom`)
- Prompts to run the **base currency** seeder

**Option:**

- `--skip-env` — Do not modify `.env` / `.env.example`

### 3. Migrate and seed (if you skipped prompts)

[](#3-migrate-and-seed-if-you-skipped-prompts)

```
php artisan migrate
php artisan db:seed --class="Vormia\\ATUMultiCurrency\\Database\\Seeders\\ATUMultiCurrencySeeder"
```

The seeder creates a default currency with rate `1.0` when none exists. If `a2_ec_settings` is present, it reads rows with `key` of `currency_code` and `currency_symbol`; otherwise it uses USD / `$`.

### 4. Optional: publish config

[](#4-optional-publish-config)

Config is merged from the package. To override in your app:

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

### 5. Optional: admin UI checklist

[](#5-optional-admin-ui-checklist)

Admin routes are registered at **`/admin/atu/currencies`**. To verify optional Flux layout dependencies and optionally inject sidebar links:

```
php artisan atumulticurrency:ui-install
php artisan atumulticurrency:ui-install --inject-sidebar
```

After `composer update` of this package, clear caches:

```
php artisan atumulticurrency:ui-update
```

Commands
--------

[](#commands)

CommandPurpose`atumulticurrency:install`Env keys; prompts for migrate/seed (`--skip-env`)`atumulticurrency:refresh`Roll back and re-run package migrations; optional seed (`--force`, `--seed`)`atumulticurrency:uninstall`Remove env keys; optional migration rollback (`--keep-env`, `--force`)`atumulticurrency:ui-install`Check UI deps; optional Flux sidebar (`--inject-sidebar`)`atumulticurrency:ui-update`Clear caches after package update`atumulticurrency:ui-uninstall`Remove **legacy** copied views and marked route/sidebar snippets (`--force`)`atumulticurrency:help`Summary of commands, env, routes, seeder classRun `php artisan atumulticurrency:help` for the canonical, up-to-date list.

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

[](#configuration)

Merged config lives in the package at `config/atu-multi-currency.php`. After publishing, edit `config/atu-multi-currency.php` in your application.

Typical keys include `default_currency`, `api`, `conversion`, and `table_prefix`.

Environment variables
---------------------

[](#environment-variables)

Installed keys (when not skipped):

```
# ATU Multi-Currency Configuration
ATU_CURRENCY_API_KEY=
ATU_CURRENCY_UPDATE_FREQUENCY=daily
ATU_CURRENCY_SETTINGS_SOURCE=database
```

- **`ATU_CURRENCY_API_KEY`** — External rates API (optional)
- **`ATU_CURRENCY_UPDATE_FREQUENCY`** — How often you refresh rates (your own scheduler logic)
- **`ATU_CURRENCY_SETTINGS_SOURCE`** — `database` (recommended) or `file`

Database tables
---------------

[](#database-tables)

All use the `atu_multicurrency_` prefix (configurable via `table_prefix`):

TableRole`atu_multicurrency_currencies`Supported currencies, rates, fees, default/active flags`atu_multicurrency_currency_rates_log`Historical rates`atu_multicurrency_currency_conversion_log`Immutable conversion audit`atu_multicurrency_settings`Stored conversion and display settingsCore principles
---------------

[](#core-principles)

1. **A2 Commerce owns truth** for stored order/catalog amounts in base currency (when A2 is used).
2. **ATU is a projection layer** — convert, log, and report without silently rewriting core rows.
3. **Complexity stays in ATU tables** — rates, logs, fees, settings.
4. **Logs are append-only** — do not mutate historical conversion rows.

Default currency and A2Commerce
-------------------------------

[](#default-currency-and-a2commerce)

When A2Commerce is present, **CurrencySyncService** keeps the default currency’s code/symbol aligned with `a2_ec_settings` using `updateOrInsert` on the `key` / `value` shape used by your A2 install.

**Operational rules** (see admin UI and services for enforcement):

- Default currency rate stays **1.0**
- Only one default currency
- Changing default is a deliberate flow (set another currency default first, where applicable)

JSON API
--------

[](#json-api)

Routes are registered by the package with the `api` middleware stack, prefix **`/api/atu/currency`**, and names like `api.atu.currency.index`.

Endpoints include listing currencies, current/default, switch, CRUD, toggle active, set default, settings read/update, and conversion logs. Secure them with your own middleware (Sanctum, admin gates, throttling) as needed.

Admin UI (Livewire 4)
---------------------

[](#admin-ui-livewire-4)

The service provider registers the package view location with `Livewire::addLocation` and loads **`/admin/atu/currencies`** routes (names such as `admin.atu.currencies.index`).

For manual route or layout merges, use the reference stubs under `vendor/vormia-folks/atu-multi-currency/src/stubs/reference/`.

Documentation
-------------

[](#documentation)

DocumentDescription[`CHANGELOG.md`](CHANGELOG.md)Version history (Keep a Changelog)[`docs/build-guide.md`](docs/build-guide.md)Install, database, API, admin UI (Livewire / Flux), UI contract[`docs/package-creation-guide.md`](docs/package-creation-guide.md)Template for ATU-style Laravel packages (optional)[`docs/releases/v2.1.0.md`](docs/releases/v2.1.0.md)Release notes for v2.1.0[A2Commerce](https://github.com/a2-atu/a2commerce) documents the commerce core this package extends.

Uninstallation
--------------

[](#uninstallation)

```
php artisan atumulticurrency:uninstall
composer remove vormia-folks/atu-multi-currency
```

The uninstall command can strip ATU env keys and optionally roll back this package’s migrations. It does not remove the Composer package; `composer remove` does that. Routes and admin Livewire UI unregister once the package is removed.

Use `atumulticurrency:ui-uninstall` first if you still have **legacy copied** Blade or Livewire files from older installs.

Troubleshooting
---------------

[](#troubleshooting)

- **Migrations not applied** — Run `php artisan migrate`. Package migrations are registered automatically.
- **Seeder skipped** — A default row already exists, or run the seeder class shown in `atumulticurrency:help`.
- **No admin pages** — Confirm `livewire/livewire` is installed (it is required by this package); run `atumulticurrency:ui-install` to verify Flux-related packages, routes, and auth middleware.
- **`a2_ec_settings` missing** — Expected without A2Commerce; seeder falls back to USD.

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

[](#contributing)

Contributions are welcome via pull request.

License
-------

[](#license)

MIT. See [opensource.org/licenses/MIT](https://opensource.org/licenses/MIT).

Versioning
----------

[](#versioning)

[Semantic Versioning](https://semver.org/); releases are tagged (for example `v2.1.0`).

```
composer require vormia-folks/atu-multi-currency:^2.1
```

```
git tag --list
git show v2.1.0 --no-patch
```

### Recent releases

[](#recent-releases)

- **v2.1.0** — [`CHANGELOG.md`](CHANGELOG.md) · [`docs/releases/v2.1.0.md`](docs/releases/v2.1.0.md)
- **v2.0.0** — See [`CHANGELOG.md`](CHANGELOG.md) (section **\[2.0.0\]**)

Older tags (`v1.x`, `v0.x`) may reflect the previous “copy stubs into the app” workflow; prefer **v2.x** docs for current behavior.

---

Built for the A2 Commerce ecosystem.

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance91

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~9 days

Total

14

Last Release

45d ago

Major Versions

v0.2.1 → v1.0.02026-01-09

v1.1.1 → v2.0.02026-04-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/f69b40bdd7f381ee33360299b1d574f9d9d0af369f7e3d925f7ac2e5d70403aa?d=identicon)[joshlminga](/maintainers/joshlminga)

---

Top Contributors

[![joshlminga](https://avatars.githubusercontent.com/u/7943555?v=4)](https://github.com/joshlminga "joshlminga (40 commits)")

---

Tags

phplaravelvormiaa2commerceatuatu-multi-currency

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vormia-folks-atu-multi-currency/health.svg)

```
[![Health](https://phpackages.com/badges/vormia-folks-atu-multi-currency/health.svg)](https://phpackages.com/packages/vormia-folks-atu-multi-currency)
```

###  Alternatives

[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1319.7k3](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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