Initial commit of LightMVC framework files.

This commit is contained in:
2026-07-28 22:57:00 +05:30
parent 6beffc9fe9
commit f8411accb4
17 changed files with 424 additions and 3 deletions
+14
View File
@@ -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)]));
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Controllers;
use Core\Controller;
class SiteController extends Controller
{
public function home()
{
return $this->render('home', [
'name' => 'My PHP MVC Framework'
]);
}
public function contact()
{
return $this->render('contact');
}
}