Initial commit of LightMVC framework files.
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
<?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)]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user