In the current Slim 3, to create a fully qualified URL for a given route name, you need to do this inside a route callable:
$router = $this->router;
$uri = $request->getUri();
$url = $uri->getScheme() . '://' . $uri->getHost()
. $uri->getPort() ? ':' . $uri->getPort() : ''
. rtrim($uri->getBasePath(), '/')
. $router->pathFor('news-archive', ['year'=>'2015'], ['foo' => 'bar']);
We need a helper method for this.
In the current Slim 3, to create a fully qualified URL for a given route name, you need to do this inside a route callable:
We need a helper method for this.