api code global jain
This commit is contained in:
53
database/seeders/RelationshipsTableSeeder.php
Normal file
53
database/seeders/RelationshipsTableSeeder.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?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()
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user