api code global jain
This commit is contained in:
39
database/seeders/BloodGroupsTableSeeder.php
Normal file
39
database/seeders/BloodGroupsTableSeeder.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use App\Constant\Constant;
|
||||
use App\Models\BloodGroup;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BloodGroupsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$inputs = [
|
||||
'A+',
|
||||
'A-',
|
||||
'B+',
|
||||
'B-',
|
||||
'AB+',
|
||||
'AB-',
|
||||
'O+',
|
||||
'O-'
|
||||
];
|
||||
|
||||
foreach ($inputs as $input) {
|
||||
BloodGroup::insert([
|
||||
'name' => $input,
|
||||
'status' => Constant::STATUS_ONE,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now()
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user