webman限定方法的请求方式

jnmcok

在webman中假如想限定路由api/index/auth只能以post的方式进行请求
1.在config/route.php中写Route::post('/api/index/auth', [app\api\controller\index::class, 'auth']);
2.用annotation注解路由插件
有没有其他更好的方式?比如像.net程序中,直接在访求上加过滤属性[httppost]就可以

643 0 0
0个回答

年代过于久远,无法发表回答
🔝