Skip to content

Instantly share code, notes, and snippets.

@kneipp
Created February 24, 2016 22:32
Show Gist options
  • Save kneipp/263ca5cdf901814f74cf to your computer and use it in GitHub Desktop.
Save kneipp/263ca5cdf901814f74cf to your computer and use it in GitHub Desktop.
if (! function_exists('link_to_back')) {
/**
* Generate a HTML link to the previous location.
*
* @param string $title
* @param array $attributes
* @param bool $secure
*
* @return string
*/
function link_to_back($title = null, $attributes = [], $secure = null)
{
return app('html')->link(back()->getTargetUrl(), $title, $attributes, $secure);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment