<?php

require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();

echo "=== Checking KCD Data ===\n";
$kcds = DB::table('kcds')->get(['id', 'code', 'name']);
echo "Total KCDs: " . $kcds->count() . "\n\n";
foreach($kcds as $kcd) {
    echo "ID: {$kcd->id}, Code: {$kcd->code}, Name: {$kcd->name}\n";
}

echo "\n=== Checking Kab/Kota Data ===\n";
$kabkotas = DB::table('kab_kota')->get(['id', 'name', 'kcd_code']);
echo "Total Kab/Kota: " . $kabkotas->count() . "\n\n";
foreach($kabkotas as $kk) {
    echo "ID: {$kk->id}, Name: {$kk->name}, KCD Code: {$kk->kcd_code}\n";
}
