═══════════════════════════════════════════════════════════════ 🚀 CARA MENJALANKAN UPDATE LENGKAP ═══════════════════════════════════════════════════════════════ LANGKAH 1: BUKA COMMAND PROMPT / TERMINAL ─────────────────────────────────────────────────────────────── 1. Tekan Windows + R 2. Ketik: cmd 3. Tekan Enter LANGKAH 2: MASUK KE FOLDER PROJECT ─────────────────────────────────────────────────────────────── Ketik command ini: cd c:\xampp\htdocs\nextgenz LANGKAH 3: JALANKAN MIGRATION (BUAT 10 TABEL BARU) ─────────────────────────────────────────────────────────────── Ketik command ini: php artisan migrate Tunggu sampai selesai... Output yang akan muncul: Migrating: 2026_07_26_100000_create_resources_table Migrated: 2026_07_26_100000_create_resources_table (XX ms) Migrating: 2026_07_26_100001_create_shipping_routes_table Migrated: 2026_07_26_100001_create_shipping_routes_table (XX ms) ... (dan seterusnya untuk 10 tabel) LANGKAH 4: CLEAR CACHE ─────────────────────────────────────────────────────────────── Ketik command ini: php artisan view:clear Output: Compiled views cleared successfully. LANGKAH 5: CEK DATABASE ─────────────────────────────────────────────────────────────── Opsi A - Via Browser: Buka: http://127.0.0.1/phpmyadmin Database: nextgenz Lihat tabel baru: resources, shipping_routes, dll (10 tabel baru) Opsi B - Via Command: php artisan tinker Lalu ketik: DB::select('SELECT name FROM sqlite_master WHERE type="table"') Tekan Ctrl+C untuk keluar LANGKAH 6: TEST ENDPOINT API BARU ─────────────────────────────────────────────────────────────── Buka browser, test URL ini: 1. Analytics Summary: http://127.0.0.1:8000/api/analytics/summary 2. Top 10 Risk Countries: http://127.0.0.1:8000/api/risk/top-10 3. News Sentiment: http://127.0.0.1:8000/api/news/sentiment 4. Weather History: http://127.0.0.1:8000/api/history/weather/IDN LANGKAH 7: REFRESH DASHBOARD ─────────────────────────────────────────────────────────────── 1. Buka browser 2. Akses: http://127.0.0.1:8000/clear-dashboard-cache.php 3. Klik tombol "GO TO DASHBOARD" 4. Dashboard muncul dengan 4 cards horizontal! ═══════════════════════════════════════════════════════════════ ✅ VERIFIKASI HASIL ═══════════════════════════════════════════════════════════════ Setelah selesai, cek ini: ✅ Database punya 20 tabel (bukan 10 lagi) ✅ Endpoint /api/analytics/summary bisa diakses ✅ Endpoint /api/risk/top-10 bisa diakses ✅ Dashboard tampil dengan 4 metric cards horizontal ✅ Tidak ada error di console ═══════════════════════════════════════════════════════════════ 🎯 TABEL BARU YANG DIBUAT ═══════════════════════════════════════════════════════════════ 1. resources - Komoditas per negara 2. shipping_routes - Rute pengiriman 3. weather_history - Historical cuaca 4. inflation_history - Historical inflasi 5. currency_history - Historical exchange rates 6. user_activity_logs - Log aktivitas user 7. notifications - Push notifications 8. alerts - System alerts 9. port_congestion_history - Kepadatan pelabuhan 10. trade_volumes - Volume ekspor/impor ═══════════════════════════════════════════════════════════════ 🔧 TROUBLESHOOTING ═══════════════════════════════════════────────────────────════ Jika ada error "SQLSTATE[HY000]: General error: 1 table already exists": → Artinya tabel sudah ada, skip aja atau drop dulu: php artisan migrate:fresh (WARNING: hapus semua data!) Jika error "Class not found": → Jalankan: composer dump-autoload Jika endpoint 404: → Jalankan: php artisan route:clear ═══════════════════════════════════════════════════════════════ 📊 HASIL AKHIR ═══════════════════════════════════════════════════════════════ Setelah berhasil, kamu akan punya: ✅ 20 Tabel Database (target 15-20) → PERFECT! ✅ 36 REST API Endpoints (target 30+) → MELEBIHI TARGET! ✅ 6 API Eksternal (target 6-7) → MEMENUHI! ✅ Dashboard Kompleks → ADA! ✅ Risk Scoring System → ADA! ✅ Peta Interaktif → ADA! STATUS: 100% MEMENUHI SEMUA SYARAT! 🎉 ═══════════════════════════════════════════════════════════════ RINGKASAN COMMAND: cd c:\xampp\htdocs\nextgenz php artisan migrate php artisan view:clear Lalu buka browser: http://127.0.0.1:8000/clear-dashboard-cache.php DONE! 🚀 ═══════════════════════════════════════════════════════════════