Created
May 8, 2014 07:50
-
-
Save clouddueling/61f62e5de9cf5d2d5b78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create a redirect response. | |
* | |
* <code> | |
* // Create a redirect response to a location within the application | |
* return Redirect::to('user/profile'); | |
* | |
* // Create a redirect response with a 301 status code | |
* return Redirect::to('user/profile', 301); | |
* </code> | |
* | |
* @param string $url | |
* @param int $status | |
* @param bool $https | |
* @return Redirect | |
*/ | |
public static function to($url, $status = 302, $https = null) | |
{ | |
return static::make('', $status)->header('Location', URL::to($url, $https)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment