HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/ghayatcom/ghayatcom-api/database/seeders/PageModuleSeeder.php
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\PageModule;

class PageModuleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $datas = [
            1 => [
                'page' => 'landing home',
                'section' => 'heading',
                'is_enabled' => 'yes',
            ],
            2 => [
                'page' => 'landing home',
                'section' => 'doctors_list',
                'is_enabled' => 'yes',
            ],
            3 => [
                'page' => 'landing home',
                'section' => 'mission_vision',
                'is_enabled' => 'yes',
            ],
            4 => [
                'page' => 'landing home',
                'section' => 'how_it_works',
                'is_enabled' => 'yes',
            ],
            5 => [
                'page' => 'landing home',
                'section' => 'why_choose_us',
                'is_enabled' => 'yes',
            ],
            6 => [
                'page' => 'landing home',
                'section' => 'service_offer',
                'is_enabled' => 'yes',
            ],
            7 => [
                'page' => 'landing home',
                'section' => 'contact_us',
                'is_enabled' => 'yes',
            ],
            8 => [
                'page' => 'landing home',
                'section' => 'client_logos',
                'is_enabled' => 'yes',
            ],
            9 => [
                'page' => 'landing home',
                'section' => 'our_insights',
                'is_enabled' => 'yes',
            ],
            10 => [
                'page' => 'landing home',
                'section' => 'footer',
                'is_enabled' => 'yes',
            ],
        ];

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