For accessing previous url in laravel.I am using this code in my controller.
$current_url = Request::url();
$back_url = redirect()->back()->getTargetUrl();
if ($current_url != $back_url) {
Session::put('previous_url', redirect()->back()->getTargetUrl());
}
This method helps maintainging previous url even when server side validation fails. In my blade i access previous url like this .
I need to find the segment segment of my previous url. Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire