feat:examples: 默认注释中间件,便于测试

This commit is contained in:
liujian 2022-05-21 22:45:07 +08:00
parent 2eb6cb105a
commit fa4064953f

View File

@ -7,6 +7,6 @@ use App\Middleware\AuthMiddleware;
return function (Mix\Vega\Engine $vega) {
$vega->handle('/hello', [new Hello(), 'index'])->methods('GET');
$vega->handle('/users/{id}', AuthMiddleware::callback(), [new Users(), 'index'])->methods('GET');
$vega->handle('/users/{id}', /* AuthMiddleware::callback(), */ [new Users(), 'index'])->methods('GET');
$vega->handle('/auth', [new Auth(), 'index'])->methods('GET');
};