routes.php 882 B

123456789101112131415161718192021222324252627282930
  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'], '/', 'App\Controller\IndexController@index');
  13. Router::get('/favicon.ico', function () {
  14. return '';
  15. });
  16. //API接口
  17. Router::addGroup('/api',function (){
  18. // 清除定时任务缓存
  19. Router::post('/config/clear_timing', [\App\Controller\Api\ConfigController::class, 'clearTiming']);
  20. // 系统是否启动
  21. Router::post('/config/check_status', [\App\Controller\Api\ConfigController::class, 'checkStatus']);
  22. // trongas笔数回调通知
  23. Router::post('/trongas/notice', [\App\Controller\Api\TrongasIoController::class, 'notice']);
  24. });