Skip to content

Commit 3b005f6

Browse files
committed
add seed all currencies
1 parent 83390ab commit 3b005f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Console/AddCountryCommand.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ public function handle()
107107
$this->seedLanguages();
108108
}
109109

110+
if ($this->isModuleEnabled('currencies')) {
111+
$this->seedAllCurrencies();
112+
}
113+
110114
$bar->finish();
111115

112116
$this->getOutput()->info('Done!');
@@ -252,6 +256,14 @@ private function seedLanguages(): void
252256
}
253257
}
254258

259+
private function seedAllCurrencies(): void
260+
{
261+
// currencies
262+
foreach ($this->modules['currencies']['data'] as $currency) {
263+
Models\Currency::create($currency);
264+
}
265+
}
266+
255267
/**
256268
* @param array $array
257269
* @param array $values

0 commit comments

Comments
 (0)