改名
This commit is contained in:
@@ -290,9 +290,6 @@ class Router extends HttpService implements RouterInterface
|
||||
$node->namespace = $this->loadNamespace($method);
|
||||
|
||||
$name = array_column($this->groupTacks, 'middleware');
|
||||
if ($this->middleware instanceof \Closure) {
|
||||
$node->addMiddleware($method, [$this->middleware]);
|
||||
}
|
||||
if (is_array($name)) {
|
||||
$node->addMiddleware($method, $this->resolve_middleware($name));
|
||||
}
|
||||
@@ -300,6 +297,15 @@ class Router extends HttpService implements RouterInterface
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Closure
|
||||
*/
|
||||
public function getMiddleware(): Closure
|
||||
{
|
||||
return $this->middleware;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string|array $middleware
|
||||
* @return array
|
||||
|
||||
Reference in New Issue
Block a user