HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec 1 20:10:50 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/ghayatcom/ghayatcom-api/database/seeders/InsuranceCompanySeeder.php
<?php

namespace Database\Seeders;

use App\InsuranceCompany;
use Illuminate\Database\Seeder;

class InsuranceCompanySeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $datas = [
            1 => ['name' => 'National Health Insurance', 'created_by' => 1, 'updated_by' => 1],
            2 => ['name' => 'Star Health Insurance', 'created_by' => 1, 'updated_by' => 1],
            3 => ['name' => 'Bajaj Insurance', 'created_by' => 1, 'updated_by' => 1],
            4 => ['name' => 'LIC', 'created_by' => 1, 'updated_by' => 1],
            5 => ['name' => 'SBI Life Insurance', 'created_by' => 1, 'updated_by' => 1],
        ];

        foreach ($datas as $id => $data) {
            $row = InsuranceCompany::firstOrNew([
                'id' => $id,
            ]);
            $row->fill($data);
            $row->save();
        }
    }
}