hyperf-chat/config/routes/websocket.php

21 lines
458 B
PHP
Raw Permalink Normal View History

2020-11-07 22:57:10 +08:00
<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use Hyperf\HttpServer\Router\Router;
// 添加 ws 服务对应的路由
2022-01-16 10:29:16 +08:00
Router::get('/wss/default.io', 'App\Controller\WebSocketController', [
2020-11-07 22:57:10 +08:00
'middleware' => [\App\Middleware\WebSocketAuthMiddleware::class]
2022-01-16 10:29:16 +08:00
]);