Initial commit of LightMVC framework files.
This commit is contained in:
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use App\Controllers\SiteController;
|
||||
use Core\Application;
|
||||
|
||||
$app = new Application(dirname(__DIR__));
|
||||
|
||||
$app->router->get('/', [SiteController::class, 'home']);
|
||||
$app->router->get('/contact', [SiteController::class, 'contact']);
|
||||
|
||||
// API routes
|
||||
$app->router->get('/api/ping', [App\Controllers\ApiController::class, 'ping']);
|
||||
|
||||
$app->run();
|
||||
Reference in New Issue
Block a user