refactor redirect class.

This commit is contained in:
Taylor Otwell
2011-08-08 23:09:10 -05:00
parent 09feb52db9
commit 7ebcdf57c5
2 changed files with 6 additions and 6 deletions

View File

@@ -24,12 +24,12 @@ class Redirect {
* Create a redirect response.
*
* @param string $url
* @param string $method
* @param int $status
* @param string $method
* @param bool $https
* @return Redirect
*/
public static function to($url, $method = 'location', $status = 302, $https = false)
public static function to($url, $status = 302, $method = 'location', $https = false)
{
$url = URL::to($url, $https);
@@ -42,13 +42,13 @@ class Redirect {
* Create a redirect response to a HTTPS URL.
*
* @param string $url
* @param string $method
* @param int $status
* @param string $method
* @return Response
*/
public static function to_secure($url, $method = 'location', $status = 302)
public static function to_secure($url, $status = 302, $method = 'location')
{
return static::to($url, $method, $status, true);
return static::to($url, $status, $method, true);
}
/**

View File

@@ -28,7 +28,7 @@ class URL {
$base = 'https://'.substr($base, 7);
}
return rtrim($base, '/').'/'.ltrim($url, '/');
return rtrim($base, '/').'/'.trim($url, '/');
}
/**