src/Router/Scope.php
public function createScope($closure) {
		$newScope = (new static($this->request, $this->result, $this->urlGenerator));
		$newScope->setupParent(
			$this->prefix,
			$this->prefixMatched,
			$this->requestPathOffset,
			$this->params
		);
		$newScope->use($this->middlewares); // Must add middlewares before adding namespace, as the middlewares are already prefixed with namespace.
		$newScope->namespace($this->namespace);
		$closure($newScope);
	}
public function createScope($closure) {
		$newScope = (new static($this->request, $this->result, $this->urlGenerator));
		$newScope->setupParent(
			$this->prefix,
			$this->prefixMatched,
			$this->requestPathOffset,
			$this->params
		);
		$newScope->use($this->middlewares); // Must add middlewares before adding namespace, as the middlewares are already prefixed with namespace.
		$newScope->namespace($this->namespace);
		$closure($newScope);
	}
public function createScope ( $ closure ) { $ newScope = ( new static ( $ this -> request , $ this -> result , $ this -> urlGenerator ) ) ; $ newScope -> setupParent ( $ this -> prefix , $ this -> prefixMatched , $ this -> requestPathOffset , $ this -> params ) ; $ newScope -> use ( $ this -> middlewares ) ; // Must add middlewares before adding namespace, as the middlewares are already prefixed with namespace. $ newScope -> namespace ( $ this -> namespace ) ; $ closure ( $ newScope ) ; }
Create a child scope.

@param callable $closure
Create a child scope .