- Add
DB::unprepared()to the run method ofDatabaseSeeder. -
Run
php artisan db:seedat the command line.class DatabaseSeeder extends Seeder { public function run() { Eloquent::unguard(); $this->call('UserTableSeeder'); $this->command->info('User table seeded!'); $path="app/developer_docs/countries.sql"; DB::unprepared(file_get_contents($path)); $this->command->info('Country table seeded!'); } }