<?php
require_once __DIR__ . '/app/core/bootstrap.php';
$pdo = crm_pdo();
$sql = "SELECT DISTINCT YEAR(start_date) as yr FROM projects WHERE start_date IS NOT NULL ORDER BY yr DESC";
$stmt = $pdo->query($sql);
$years = $stmt->fetchAll(PDO::FETCH_COLUMN);
echo json_encode($years);
