Files
Global-Jain/database/seeders/RelationshipsTableSeeder.php

54 lines
1.1 KiB
PHP
Raw Normal View History

2025-11-05 10:37:10 +05:30
<?php
namespace Database\Seeders;
use App\Constant\Constant;
use Carbon\Carbon;
use App\Models\Relationship;
use Illuminate\Database\Seeder;
class RelationshipsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$inputs = [
'Father',
'Mother',
'Brother',
'Sister',
'Grandfather',
'Grandmother',
'Uncle',
'Aunt',
'Husband',
'Wife',
'Son',
'Daughter',
'Grandson',
'Granddaughter',
'Nephew',
'Niece',
'Father-in-law',
'Mother-in-law',
'Brother-in-law',
'Sister-in-law',
'Son-in-law',
'Daughter-in-law',
];
foreach ($inputs as $input) {
Relationship::insert([
'name' => $input,
'status' => Constant::STATUS_ONE,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now()
]);
}
}
}