We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fdfb07 commit ba89481Copy full SHA for ba89481
src/Middleware/SetLocale.php
@@ -46,10 +46,9 @@ private function setLocale($locale)
46
public function setDefaultLocale()
47
{
48
if (config('language.auto')) {
49
- $agent = new Agent();
+ $languages = (new Agent())->languages();
50
51
- $language = reset($agent->languages());
52
- $this->setLocale($language);
+ $this->setLocale(reset($languages));
53
} else {
54
$this->setLocale(config('app.locale'));
55
}
0 commit comments