get('/', 'Books::index'); // Books $routes->get('/sach', 'Books::index'); $routes->get('/sach/(:segment)', 'Books::show/$1'); // Media proxy (viewer-only PDF + covers) & on-demand thumbnails $routes->get('/media/cover/(:segment)', 'Media::cover/$1'); $routes->get('/media/pdf/(:segment)', 'Media::pdf/$1'); $routes->get('/thumb/(:any)/(:any)', 'Thumb::serve/$1/$2'); // Reader: /doc/{id} — captcha gate then online reading page $routes->get('/doc/(:segment)', 'Download::page/$1'); $routes->post('/doc/(:segment)', 'Download::page/$1'); $routes->post('/pdf-token/(:segment)', 'Download::token/$1'); $routes->get('/captcha', 'Download::captcha'); $routes->get('/tai-ve/(:segment)/(:segment)', 'Download::fetch/$1/$2'); // Static pages + contact $routes->get('/lien-he', 'Pages::contact'); $routes->post('/lien-he', 'Pages::contact'); $routes->get('/(:segment)', 'Pages::view/$1'); // API health $routes->get('/api/health', static function () { return service('response')->setJSON(['ok' => true, 'time' => date(DATE_ATOM)]); });