Created
December 9, 2012 07:30
-
-
Save ashitvora-zz/4243784 to your computer and use it in GitHub Desktop.
Back button link macro for Laravel PHP Framework
This file contains 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
/** | |
* Link to Back page | |
*/ | |
HTML::macro("link_to_back", function($text = "Back"){ | |
return "<a href='javascript:history.back();'>$text</a>"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use a the Request::referrer() instead javascript.