<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class CustomerSeeder extends Seeder
{
    public function run()
    {
        DB::statement('SET FOREIGN_KEY_CHECKS=0;'); // Disable foreign key checks
        DB::table('customers')->truncate(); // Truncate the table
        DB::statement('SET FOREIGN_KEY_CHECKS=1;'); // Re-enable foreign key checks

        DB::table('customers')->insert([
            ['email' => 'john@example.com', 'name' => 'John Doe', 'phone' => '1234567890'],
            ['email' => 'jane@example.com', 'name' => 'Jane Smith', 'phone' => '9876543210'],
        ]);
    }
}
