/** * @docInherit */ protected function newRoute($methods, $uri, $action) { if (count($this->localeStack) === 0) { return parent::newRoute($methods, $uri, $action); } $locale = end($this->localeStack); return new Route($methods, $uri, $action, $locale); }
/** * {@inheritDoc} */ protected function newRoute($methods, $uri, $action) { if ($this->routingToApi()) { return new Route($methods, $uri, $action); } return parent::newRoute($methods, $uri, $action); }