Skip to content

Instantly share code, notes, and snippets.

@ashitvora-zz
Created December 9, 2012 07:30
Show Gist options
  • Save ashitvora-zz/4243784 to your computer and use it in GitHub Desktop.
Save ashitvora-zz/4243784 to your computer and use it in GitHub Desktop.
Back button link macro for Laravel PHP Framework
/**
* Link to Back page
*/
HTML::macro("link_to_back", function($text = "Back"){
return "<a href='javascript:history.back();'>$text</a>";
});
@diegofelix
Copy link

I use a the Request::referrer() instead javascript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment