No, but you can use session to save URLs 2-3-4 pages back. Use the Session::
facade or session()
helper for a shorter syntax :
$links = session()->has('links') ? session('links') : []; $currentLink = request()->path(); // Getting current URI like 'category/books/' array_unshift($links, $currentLink); // Putting it in the beginning of links array session(['links' => $links]); // Saving links array to the session
And use it:
return redirect(session('links')[2]);
source share