TP6 路由中间件验证参数这里写自定义目录标题
一:通过 php think make:middleware Check 命令快速生成中间件
二:再生成的文件中编写业务代码
# public function handle($request, \Closure $next)
{
//获取当前参数
$params = $request->param();
//获取访问控制器和方法
$method =$request->rule()->getName();
//通过字符串分割,获取到具体的类文件和操作的方法名称
$controller = substr($method,0,strpos($method,'@'));
$scene = substr($method,strpos