medo19/naqd

There is no license information available for the latest version (v1.0.0) of this package.

Naqd is a lightweight package that provides ISO 4217-compliant currency data along with corresponding Unicode symbols and SVG icons.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/medo19/naqd

v1.0.0 2025-07-21 09:40 UTC

This package is auto-updated.

Last update: 2025-12-21 11:12:51 UTC


README

Naqd is a lightweight Laravel package that provides ISO 4217-compliant Naqd data, including Naqd codes, names, symbols, and SVG icons for easy display and localization.

📦 Installation

  1. Add the package to your Laravel project's composer.json (if locally developed):
composer require medo19/naqd

⚙️ Service Provider & Facade (Auto-discovered)

For Laravel 5.5+, this package uses auto-discovery.

If you need to register manually:

// config/app.php
'providers' => [
    Medo19\Naqd\NaqdServiceProvider::class,
],

'aliases' => [
    'Naqd' => Medo19\Naqd\Facades\Naqd::class,
]

🧰 Usage

Get all currencies:

$currencies = Naqd::all();

Get a specific Naqd:

$usd = Naqd::get('usd');

// Result:
[
    "code" => "USD",
    "name" => "United States Dollar",
    "symbol" => "$",
    "unicode" => "U+0024",
    "numeric" => "840",
    "decimal_digits" => 2,
    "svg" => "usd.svg"
]

Display an SVG (inline):

In Blade:

{!! Naqd::getSvg('usd') !!}

Outputs the full <svg>...</svg> inline.

🖼️ Publishing Assets

You can publish the Naqd JSON file or SVG icons if needed:

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

Or add your own publishing tags in NaqdServiceProvider.

🗂 Directory Structure

packages/
└── medo19/
    └── naqd/
        ├── src/
        │   ├── data/
        │   │   ├── currencies.json
        │   │   └── svg/
        │   │       ├── usd.svg
        │   │       ├── eur.svg
        │   │       └── ...
        │   ├── Naqd.php
        │   ├── NaqdServiceProvider.php
        │   └── Facades/
        │       └── Naqd.php
        └── composer.json

📜 License

MIT License — Free to use and modify.

🤝 Contributions

Feel free to submit PRs or suggestions.

📧 Maintainer

Muhammad Abdulrazek GitHub: @medo19

---