Commit 0b3ecf89 authored by Taylor Otwell's avatar Taylor Otwell

Pass status when redirecting to route.

parent c11ee765
......@@ -81,14 +81,16 @@ class Redirect extends Response {
{
$parameters = (isset($parameters[0])) ? $parameters[0] : array();
$status = (isset($parameters[1])) ? $parameters[1] : 302;
if (strpos($method, 'to_secure_') === 0)
{
return static::to(URL::to_route(substr($method, 10), $parameters, true));
return static::to(URL::to_route(substr($method, 10), $parameters, true), $status);
}
if (strpos($method, 'to_') === 0)
{
return static::to(URL::to_route(substr($method, 3), $parameters));
return static::to(URL::to_route(substr($method, 3), $parameters), $status);
}
throw new \Exception("Method [$method] is not defined on the Redirect class.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment