routes.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. declare (strict_types = 1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. use Hyperf\HttpServer\Router\Router;
  12. Router::addRoute(['GET', 'POST', 'HEAD'], '/index', 'App\Controller\IndexController@index');
  13. Router::addRoute(['GET', 'POST', 'HEAD'], '/download', 'App\Controller\IndexController@download');
  14. Router::get('/api/getData', 'App\Controller\LoginController@getData');
  15. Router::get('/favicon.ico', function () {
  16. return '';
  17. });
  18. Router::addServer('ws', function () {
  19. Router::get('/', 'App\Controller\WebSocketController');
  20. });
  21. require __DIR__ . '/api/user.php';
  22. require __DIR__ . '/api/public.php';
  23. require __DIR__ . '/api/ad.php';
  24. require __DIR__ . '/api/complaint.php';
  25. require __DIR__ . '/api/authority.php';
  26. require __DIR__ . '/api/chat.php';
  27. require __DIR__ . '/api/link.php';
  28. require __DIR__ . '/api/login.php';
  29. require __DIR__ . '/api/news.php';
  30. require __DIR__ . '/api/website.php';
  31. require __DIR__ . '/api/web.php';
  32. require __DIR__ . '/api/order.php';
  33. require __DIR__ . '/api/collector.php';
  34. require __DIR__ . '/api/footer.php';