<?php
namespace App\Controllers;

use App\Core\Database;

class ApiController
{
    public function submissions(): void
    {
        header('Content-Type: application/json');
        $db = Database::getInstance();
        echo json_encode(
            $db->query("SELECT id,title,stage FROM submissions")->fetchAll()
        );
    }
}
