migration appointment & seeder
This commit is contained in:
30
database/seeders/AppointmentTypesSeeder.php
Normal file
30
database/seeders/AppointmentTypesSeeder.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class AppointmentTypesSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$codes = ['ROUTINE', 'WALKIN', 'CHECKUP', 'FOLLOWUP', 'EMERGENCY', 'TELECONSULTATION'];
|
||||
$names = ['Routine', 'Walk In', 'Check-Up', 'Follow Up', 'Emergency', 'Teleconsultation'];
|
||||
$descriptions = ['Routine Appointment', 'A previously unscheduled walk-in visit', 'A routine check-up, such as an annual physical', 'A follow up visit from a previous appointment', 'Emergency appointment', 'Teleconsultation appointment'];
|
||||
|
||||
for ($i = 0; $i < count($codes); $i++) {
|
||||
DB::table('appointment_types')->insert([
|
||||
'code' => $codes[$i],
|
||||
'name' => $names[$i],
|
||||
'description' => $descriptions[$i]
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user