diff --git a/src/Events/LocaleChanged.php b/src/Events/LocaleChanged.php index 9cb8575..e518f30 100644 --- a/src/Events/LocaleChanged.php +++ b/src/Events/LocaleChanged.php @@ -6,6 +6,6 @@ class LocaleChanged { public function __construct( public string $locale - ){ + ) { } } diff --git a/src/Http/Middleware/SwitchLanguageLocale.php b/src/Http/Middleware/SwitchLanguageLocale.php index f5cf294..5ea7c08 100644 --- a/src/Http/Middleware/SwitchLanguageLocale.php +++ b/src/Http/Middleware/SwitchLanguageLocale.php @@ -26,7 +26,7 @@ public function handle(Request $request, Closure $next): \Illuminate\Http\Respon private function getBrowserLocale(Request $request): ?string { $appLocales = LanguageSwitch::make()->getLocales(); - + $userLocales = preg_split('/[,;]/', $request->server('HTTP_ACCEPT_LANGUAGE')); foreach ($userLocales as $locale) {