1. Go to this page and download the library: Download thibitisha/kmpdc-seeder library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thibitisha / kmpdc-seeder example snippets
use App\Models\Practitioner;
Practitioner::with(['status', 'speciality', 'subSpeciality', 'qualifications'])->first();
use App\Models\Practitioner;
// Fetch one doctor
$doctor = Practitioner::with(['status', 'speciality', 'subSpeciality', 'qualifications.degree', 'qualifications.institution'])->first();
$doctor->full_name; // "Dr JOHN DOE"
$doctor->status->name; // "ACTIVE"
$doctor->speciality?->name; // "SURGERY"
$doctor->subSpeciality?->name; // "CARDIOLOGY"
// Get all unique institutions
\App\Models\Institution::pluck('name');
// Find all practitioners under Internal Medicine
\App\Models\Practitioner::whereHas('speciality', fn($q) => $q->where('name', 'INTERNAL MEDICINE'))->count();