public function toRoute($handler, $parameters = []) { $path = $this->router->getPath($handler, $parameters); $path = ltrim($path, '/'); return $this->request->getBaseUrl() . '/' . $path; }