корзина кеш
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Controllers\CatalogController;
|
||||
use App\Controllers\CartController;
|
||||
use App\Controllers\HomeController;
|
||||
use App\Controllers\PageController;
|
||||
use App\Controllers\PriceRequestController;
|
||||
@@ -110,6 +111,7 @@ $catalogSearchHandler = static function (?string $rawQuery = null): void {
|
||||
|
||||
$router->get('/', static fn () => (new HomeController())->index());
|
||||
$router->post('/price-request', static fn () => (new PriceRequestController())->store());
|
||||
$router->post('/api/cart/sync', static fn () => (new CartController())->sync());
|
||||
$router->get('/search', static fn () => $catalogSearchHandler());
|
||||
$router->get('/search/{query}', static fn (string $query) => $catalogSearchHandler($query));
|
||||
$router->get('/catalog', static fn () => trim((string) ($_GET['q'] ?? '')) !== '' ? $catalogSearchHandler() : (new CatalogController())->index());
|
||||
|
||||
Reference in New Issue
Block a user