thinkPHP6.0 开启多应用后无法获取控制器和方法名,返回空值
felixwann opened this issue · comments
felixwann commented
打印Request对象:
dd($this->request);
解决办法:
$routeName = $this->request->rule()->getName();
$routeName = explode('@', $routeName);
$controllerName = $routeName[0];
$actionName = $routeName[1];
dump($controllerName, $actionName);