Exemple #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Currencies::create(['name' => 'USD', 'rate' => '1.0', 'icon' => '$', 'default' => true]);
     $this->command->info('Currencies table seeded!');
 }
Exemple #2
0
 public function getCurrencies()
 {
     $currencies = Currencies::get();
     $arr = [];
     if ($currencies->count()) {
         foreach ($currencies as $value) {
             $arr[$value->name] = $value->rate;
         }
     }
     return $arr;
 }