Permalink
Browse files

added Redirect::away method to skip URL validation.

  • Loading branch information...
taylorotwell committed Oct 2, 2013
1 parent 12ab7e8 commit 8c47d1173a8f666d8be278219f63d3c51459379e
Showing with 15 additions and 1 deletion.
  1. +2 −1 src/Illuminate/Foundation/changes.json
  2. +13 −0 src/Illuminate/Routing/Redirector.php
@@ -45,6 +45,7 @@
{"message": "Foreign characters now supported in validation 'alpha' rules.", "backport": null},
{"message": "Added 'prepend' method to Filesystem.", "backport": null},
{"message": "Added 'reduce' collection to Collection, and 'min' and 'max' to Eloquent Collection.", "backport": null},
{"message": "Added 'firstOrCreate' and 'firstOrNew' methods to Eloquent model.", "backport": null}
{"message": "Added 'firstOrCreate' and 'firstOrNew' methods to Eloquent model.", "backport": null},
{"message": "Added Redirect::away method to always redirect to external URL with no validation.", "backport": null}
]
}
@@ -117,6 +117,19 @@ public function to($path, $status = 302, $headers = array(), $secure = null)
return $this->createRedirect($path, $status, $headers);
}
/**
* Create a new redirect response to an external URL (no validation).
*
* @param string $path
* @param int $status
* @param array $headers
* @return \Illuminate\Http\RedirectResponse
*/
public function away($path, $status = 302, $headers = array())
{
return $this->createRedirect($path, $status, $headers);
}
/**
* Create a new redirect response to the given HTTPS path.
*

0 comments on commit 8c47d11

Please sign in to comment.