Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Algolia
    • Algolia Webshop
    • API
    • Audits
    • Avatars
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • Localisation
    • Lockable Models
    • Logs
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

Currencies

LicenseStablePHPIssuesMerge Requests

Description

Currencies adds currency and exchange-rate management to Enso.

The package exposes CRUD flows for currencies and exchange rates, keeps track of the application's default currency, links currencies to countries through currency codes, and provides a conversion service together with a conversion endpoint.

It is intended for private Enso deployments that need administrative currency management and server-side amount conversion.

Installation

This is a proprietary package distributed through the private Enso registry.

Run the package migrations:

php artisan migrate

Optional publishes:

php artisan vendor:publish --tag=currencies-config
php artisan vendor:publish --tag=currency-seeder

Default configuration:

return [
    'converterPrecision' => 4,
];

Features

  • Currency CRUD and selector endpoints.
  • Exchange-rate CRUD endpoints with per-date conversion values.
  • Default currency protection against accidental deletion.
  • Server-side conversion service with configurable precision and fallback to the most recent rate when the requested date has no exact match.
  • Included seeders and factories for bootstrapping data.

Usage

Use the conversion service in code:

use LaravelEnso\Currencies\Models\Currency;
use LaravelEnso\Currencies\Services\Conversion;

$from = Currency::whereCode('EUR')->firstOrFail();
$to = Currency::whereCode('RON')->firstOrFail();

$amount = (new Conversion())
    ->from($from)
    ->to($to)
    ->amount('100.00')
    ->handle();

You can also convert to the default currency directly:

Conversion::toDefault($from, '100.00');

API

HTTP routes

Currencies:

  • GET api/administration/currencies/create
  • POST api/administration/currencies
  • GET api/administration/currencies/{currency}/edit
  • PATCH api/administration/currencies/{currency}
  • DELETE api/administration/currencies/{currency}
  • GET api/administration/currencies/initTable
  • GET api/administration/currencies/tableData
  • GET api/administration/currencies/exportExcel
  • GET api/administration/currencies/options
  • GET api/administration/currencies/convert

Exchange rates:

  • GET api/administration/exchangeRates/create
  • POST api/administration/exchangeRates
  • GET api/administration/exchangeRates/{exchangeRate}/edit
  • PATCH api/administration/exchangeRates/{exchangeRate}
  • DELETE api/administration/exchangeRates/{exchangeRate}
  • GET api/administration/exchangeRates/initTable
  • GET api/administration/exchangeRates/tableData
  • GET api/administration/exchangeRates/exportExcel

Depends On

Required Enso packages:

  • laravel-enso/api ↗
  • laravel-enso/core ↗
  • laravel-enso/countries ↗
  • laravel-enso/forms ↗
  • laravel-enso/helpers ↗
  • laravel-enso/migrator ↗
  • laravel-enso/select ↗
  • laravel-enso/tables ↗

Companion frontend package:

  • @enso-ui/currencies ↗
Edit this page on GitHub
Last Updated: 4/20/2026, 3:09:20 PM
Prev
Countries
Next
Data Export