54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?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()
|
|
]);
|
|
}
|
|
}
|
|
}
|