Files

14 lines
343 B
PHP
Executable File

<?php
namespace App\Controllers;
use Core\Controller;
class ApiController extends Controller
{
public function ping()
{
// Simple health-check endpoint
$this->response->setHeader('Content-Type', 'application/json');
$this->response->setBody(json_encode(['status' => 'ok', 'time' => microtime(true)]));
}
}