Replace seeder for currencies table with migration
ADD
database/migrations/2018_10_24_062234_insert_major_western_currencies.php
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class InsertMajorWesternCurrencies extends Migration {
+ public function up() {
+ DB::table('currencies')->insert([
+ [
+ 'name' => 'Euro',
+ 'symbol' => '&euro;'
+ ], [
+ 'name' => 'US Dollar',
+ 'symbol' => '&dollar;'
+ ], [
+ 'name' => 'British Pound',
+ 'symbol' => '&pound;'
+ ]
+ ]);
+ }
+
+ public function down() {
+ //
+ }
+}

DELETE
database/seeds/CurrenciesTableSeeder.php
-<?php
-
-use Illuminate\Database\Seeder;
-
-use App\Currency;
-
-class CurrenciesTableSeeder extends Seeder {
- public function run() {
- Currency::insert([
- [
- 'name' => 'Euro',
- 'symbol' => '&euro;'
- ], [
- 'name' => 'US Dollar',
- 'symbol' => '&dollar;'
- ], [
- 'name' => 'Pound',
- 'symbol' => '&pound;'
- ]
- ]);
- }
-}

MODIFY
database/seeds/DatabaseSeeder.php
database/seeds/DatabaseSeeder.php
@@ -4,7 +4,6 @@ use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder {
public function run() {
- $this->call(CurrenciesTableSeeder::class);
$this->call(UsersTableSeeder::class);
}
}

Replace seeder for currencies table with migration