官方文档,只有定义的使用传参,没写怎么在控制器中给中间件传参数,
框架中间件已经通过别名 enteryCheck 定义
public function handle($request, \Closure $next,$cache_prex)
{
dd($cache_prex);
return $next($request);
}在控制器调用别名中间件:
protected $middleware = ['enteryCheck'];现在问题是如何在控制器中给中间件传值,试过以下好几种方式都不行
1、 protected $middleware = ['enteryCheck','aaaa'];
2、 protected $middleware = ['enteryCheck'=>'aaaa'];各位大佬有谁知道这个该怎么实现吗 最佳答案