diff --git a/src/Controllers/Language.php b/src/Controllers/Language.php index 0fd97fd..0b52ace 100644 --- a/src/Controllers/Language.php +++ b/src/Controllers/Language.php @@ -72,7 +72,10 @@ public function back($locale, Request $request) $session->setPreviousUrl($url); } - - return redirect($session->previousUrl()); + return redirect( + $session->previousUrl() + ? $session->previousUrl() + : (config('language.url') ? url('/' . $locale) : url('/')) + ); } }