New currencies: Paraguayan Guaraní, Algerian Dinar (#447)

* feat(currency): add Algerian Dinar (DZD) support (#395)

* Add Paraguayan Guarany (PYG) currency  (#434)

* Adding Paraguayan currency, closes #404

* Adding the currency to the seeder too

* If the data was already seeded, don't add the entry

* Pint

---------

Co-authored-by: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com>

* Add DZD currency to the currencies seeder

---------

Co-authored-by: Polat İnceler <inceler.polat@gmail.com>
Co-authored-by: mchev <martin.chevignard@gmail.com>
This commit is contained in:
Darko Gjorgjijoski
2025-08-28 14:13:03 +02:00
committed by GitHub
parent a006b07be5
commit 32f7bc053a
2 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
use App\Models\Currency;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
public function up(): void
{
Currency::firstOrCreate(
['code' => 'DZD'],
[
'name' => 'Algerian Dinar',
'symbol' => 'DA',
'precision' => '2',
'thousand_separator' => ',',
'decimal_separator' => '.',
]);
Currency::firstOrCreate(
['code' => 'PYG'],
[
'name' => 'Paraguayan Guaraní',
'symbol' => '₲',
'precision' => '0',
'thousand_separator' => '.',
'decimal_separator' => ',',
]
);
}
};

View File

@@ -622,6 +622,22 @@ class CurrenciesTableSeeder extends Seeder
'thousand_separator' => ',',
'decimal_separator' => '.',
],
[
'name' => 'Algerian Dinar',
'code' => 'DZD',
'symbol' => 'DA',
'precision' => '2',
'thousand_separator' => ',',
'decimal_separator' => '.',
],
[
'name' => 'Paraguayan Guaraní',
'code' => 'PYG',
'symbol' => '₲',
'precision' => '0',
'thousand_separator' => '.',
'decimal_separator' => ',',
],
];
foreach ($currencies as $currency) {