<?php
session_start();
include '../config/database.php';
$db = new Database(); $conn = $db->getConnection();

$stmt = $conn->query("SELECT * FROM visi_misi_dpw ORDER BY tahun DESC");
header('Content-Type: application/json');
echo json_encode(['data' => $stmt->fetchAll(PDO::FETCH_ASSOC)]);
?>