PHP code example of medo19 / naqd

1. Go to this page and download the library: Download medo19/naqd library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

medo19 / naqd example snippets


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

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

$currencies = Naqd::all();

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

// Result:
[
    "code" => "USD",
    "name" => "United States Dollar",
    "symbol" => "$",
    "unicode" => "U+0024",
    "numeric" => "840",
    "decimal_digits" => 2,
    "svg" => "usd.svg"
]
bash
php artisan vendor:publish --tag=currencies-config

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