设置路由的请求方式
//引入系统路由类
use \think\Route;
//支持get请求
Route::rule('test','index/index/test','get');
Route::get('test','index/index/test');
//支持post请求
Route::rule('test','index/index/test','post');
Route::post('test','index/index/test');
//同时支持get和post请求
Route::rule('test','index/index/test','post|get');
//支持所有请求方式
Route::rule('test','index/index/test','*');
Route::any('test','index/index/test');
put、delete请求方式类同!
来源:https://blog.csdn.net/beyond_1990/article/details/99459472