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('/cart', static fn () => (new PageController())->cart()); $router->get('/product/{slug}', static fn (string $slug) => (new CatalogController())->product($slug)); $router->get('/catalog/{slug}', static fn (string $slug) => (new CatalogController())->category($slug)); $router->dispatch($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI']);