<?php
require 'config.php';
require 'includes/db.php';
$stmt = $pdo->query("SELECT id, name, slug FROM templates ORDER BY id ASC");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($rows, JSON_PRETTY_PRINT);
?>

