first commit
This commit is contained in:
34
database/seeds/DestinationTableSeeder.php
Normal file
34
database/seeds/DestinationTableSeeder.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class DestinationTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//DB::table('destination')->truncate();
|
||||
/*
|
||||
$unixTimestamp = time();
|
||||
$destinationId = DB::table('destination')->insertGetId([
|
||||
'name'=> 'Turkey', 'parent_id' => 0, 'country_code' => 'TR', 'created_at'=> $unixTimestamp, 'updated_at' => $unixTimestamp
|
||||
]);
|
||||
$destinationId = DB::table('destination')->insertGetId([
|
||||
'name'=> 'Istanbul', 'parent_id' => $destinationId, 'country_code' => 'TR', 'created_at'=> $unixTimestamp, 'updated_at' => $unixTimestamp
|
||||
]);
|
||||
$destinationId = DB::table('destination')->insertGetId([
|
||||
'name'=> 'Fatih', 'parent_id' => $destinationId, 'country_code' => 'TR','created_at'=> $unixTimestamp, 'updated_at' => $unixTimestamp
|
||||
]);
|
||||
|
||||
DB::table('destination')->insertGetId([
|
||||
'name'=> 'Sultanahmet', 'parent_id' => $destinationId, 'country_code' => 'TR', 'created_at'=> $unixTimestamp, 'updated_at' => $unixTimestamp
|
||||
]);
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user