Files
lpj/database/seeders/HolidayCalendarSeeder.php

58 lines
1.6 KiB
PHP

<?php
namespace Modules\Lpj\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Basicdata\Models\HolidayCalendar;
class HolidayCalendarSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$holiday = [
[
'date' => '2024-12-25',
'description' => 'Hari Raya Natal',
'type' => 'national_holiday',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2024-12-26',
'description' => 'Cuti Bersama Hari Raya Natal',
'type' => 'collective_leave',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2025-01-01',
'description' => 'Tahun Baru Masehi',
'type' => 'national_holiday',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2025-01-27',
'description' => 'Isra Mi\'raj',
'type' => 'national_holiday',
'created_at' => now(),
'updated_at' => now()
],
[
'date' => '2025-01-28',
'description' => 'Cuti Bersama Tahun Baru Imlek',
'type' => 'collective_leave',
'created_at' => now(),
'updated_at' => now()
]
];
foreach ($holiday as $item) {
HolidayCalendar::create($item);
}
}
}