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 8085000 commit 124b1ccCopy full SHA for 124b1cc
src/Middleware/SetLocale.php
@@ -51,6 +51,10 @@ protected function getLocaleFromFallbackRoute(\Illuminate\Http\Request $request)
51
return $omittedLocale;
52
}
53
54
+ if ( ! $localeIsSupported) {
55
+ return null;
56
+ }
57
+
58
return $locale;
59
60
tests/Unit/Macros/LocalizedUrlMacroTest.php
@@ -463,7 +463,7 @@ public function it_returns_a_localized_url_for_a_non_localized_fallback_route_if
463
'en' => Route::localizedUrl('en'),
464
'nl' => Route::localizedUrl('nl'),
465
], 404);
466
- })->name('404');
+ })->middleware(SetLocale::class)->name('404');
467
468
$response = $this->call('GET', '/non/existing/route');
469
$response->assertNotFound();
0 commit comments