Skip to content

Commit db4b33d

Browse files
author
Marc Cámara
authored
Merge pull request mcamara#328 from tomloveladyepd/master
Fix bug causing redirects to always pick default locale
2 parents 4094b87 + c0088a9 commit db4b33d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mcamara/LaravelLocalization/Middleware/LaravelLocalizationRedirectFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function handle( $request, Closure $next )
3737
// If the current url does not contain any locale
3838
// The system redirect the user to the very same url "localized"
3939
// we use the current locale to redirect him
40-
$redirection = app('laravellocalization')->getLocalizedURL();
40+
$redirection = app('laravellocalization')->getLocalizedURL(session('locale'), $request->path());
4141
}
4242

4343
if ( $redirection )

0 commit comments

Comments
 (0)