xxxxxxxxxx
//using js you may go to previous page.
<a href="" onclick="window.history.back()">
//or use larevel helper
<a href="{{ url()->previous() }}">
//Note:- this will take to any request that is exicuted previously e.g post,get,patch.
//in controller
return back();
or
return redirect()->back();
xxxxxxxxxx
1. The cleanest way seems to be using the url() helper:
{{ url()->previous() }}
2. URL::previous() works for me in my Laravel 5.1 project. Here is Laravel 5.1
doc for previous() method, which is accessible through URL Facade.
3. You can still try alternatives, in your views you can do:
{{ redirect()->getUrlGenerator()->previous() }}
OR
{{ redirect()->back()->getTargetUrl() }}