шаг 5 завершен

This commit is contained in:
Alisa
2026-06-04 19:19:35 +03:00
parent 238831ad3a
commit 6216c1ee4f
34 changed files with 1859 additions and 36 deletions
+5
View File
@@ -4,6 +4,7 @@ declare(strict_types=1);
use App\Controllers\CatalogController;
use App\Controllers\HomeController;
use App\Controllers\PageController;
use App\Core\Router;
require_once dirname(__DIR__) . '/app/bootstrap.php';
@@ -12,6 +13,10 @@ $router = new Router();
$router->get('/', static fn () => (new HomeController())->index());
$router->get('/catalog', static fn () => (new CatalogController())->index());
$router->get('/delivery', static fn () => (new PageController())->delivery());
$router->get('/payment', static fn () => (new PageController())->payment());
$router->get('/contacts', static fn () => (new PageController())->contacts());
$router->get('/returns', static fn () => (new PageController())->returns());
$router->get('/catalog/{slug}', static fn (string $slug) => (new CatalogController())->category($slug));
$router->dispatch($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI']);