How to redirect to previous page in laravel5.2 like URI Referrer in php.
I've tried $request->url(); but it gets the current url.
I've a form and list pages.There are many lists that redirects to form.but I want to go to that specific page after submit.
For Ex:There are a Project and Client list. If I go to form from project then it should go to project and if I go to form from client list It should go to client list page after submitting a form.
Inside your template file you can just use:
Thank You for answers. I've got it now.
set the hidden variable in blade to get previous page url using
after that get it by
$request->input('url');
in controller,Then redirect it.you should this methods:
return calling controller:
return calling url:
REDIRECTS LARAVEL 5.2
You have a global back function:
You should use
return redirect()->back();