-
-
Save WISHPRO/1b55805613bd4511b048 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 | |
function redirect_back_or_default($url = null){ | |
try{ | |
return Redirect::back(); | |
}catch(Exception $e){ | |
return Redirect::to($url); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment