Hey there,
Still in the process of upgrading my app from Slim 2 to Slim 3 (and then 4).
Two questions:
- Is there a difference between
return $response->withRedirect($url, 301);
andreturn $response->withStatus(301)->withHeader('Location', $url);
? - Is there a way to detect if
$response
contains a redirect? This would be useful inside middleware, where running$response = $next($request, $response);
is not wanted if the code that came before it set a redirect on the response.
Thanks for the heads up.