Files

25 lines
842 B
PHP
Executable File

<?php
use app\controllers\AuthController;
use app\core\Application;
use app\controllers\SiteController;
require_once __DIR__.'/vendor/autoload.php';
$app = new Application();
$app->router->get('/', [SiteController::class, 'renderMainPage']);
$app->router->get('/homepage', [SiteController::class, 'homepage']);
$app->router->get('/login', [AuthController::class, 'loginPage']);
$app->router->post('/login', [AuthController::class, 'loginPage']);
$app->router->get('/register', [AuthController::class, 'registerPage']);
$app->router->post('/register', [AuthController::class, 'registerPage']);
$app->router->get('/profile', [AuthController::class, 'profile']);
$app->router->post('/profile', [AuthController::class, 'profile']);
$app->router->get('/logout', [AuthController::class, 'logout']);
$app->run();