Featured tours working

This commit is contained in:
2025-09-15 13:40:20 +10:00
parent f0e7ce30fc
commit e965cc2780
24 changed files with 384 additions and 26 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Database\Seeders;
use App\Models\Continent;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class CountrySeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$map = Continent::all()->pluck('id', 'internal_name')->toArray();
\DB::table('countries')->insert([
['internal_name'=>'comoros','name'=>'Comoros','country_code'=>'km','continent_id'=>$map['africa']],
['internal_name'=>'madagascar','name'=>'Madagascar','country_code'=>'mg','continent_id'=>$map['africa']],
['internal_name'=>'suriname','name'=>'Suriname','country_code'=>'sn','continent_id'=>$map['south_america']],
['internal_name'=>'mauritania','name'=>'Mauritania','country_code'=>'mr','continent_id'=>$map['africa']],
['internal_name'=>'china','name'=>'China','country_code'=>'cn','continent_id'=>$map['asia']],
['internal_name'=>'tajikistan','name'=>'Tajikistan','country_code'=>'tj','continent_id'=>$map['asia']],
['internal_name'=>'gabon','name'=>'Gabon','country_code'=>'ga','continent_id'=>$map['africa']],
]);
}
}