Call method within URL in Laravel

1

I have a page with a "back" link. Is there a way to call the back() method of Laravel within href of the link? This code does not work, but I want something like

href="{{URL::to(back())}}"

    
asked by anonymous 11.08.2016 / 20:03

1 answer

1

try the following:

href="{{URL::previous()}}"

You can also do with javascript:

<a href="#" onclick="window.history.go(-1);">...</a>
    
11.08.2016 / 20:05