-
-
Notifications
You must be signed in to change notification settings - Fork 513
Open
Labels
Description
Describe the bug
Route caching doesn't work in Laravel 11. The package's caching documentation relies on RouteServiceProvider which has been removed in Laravel 11.
To Reproduce
- Create new Laravel 11 project
- Install mcamara/laravel-localization
- Follow caching setup guide at https://github.com/mcamara/laravel-localization/blob/master/CACHING.md
- Get error when running
artisan route:trans:cachebecauseRouteServiceProviderdoesn't exist - Without those modifications get 404 errors on localized routes after caching routes
Expected behavior
Route caching should work with Laravel 11's new routing system
More info:
- Laravel Version: 11.x
- Laravel-localization Version: 1.8.2
- Middleware:
localize,localizationRedirect,localeCookieRedirect,localeViewPath - Config:
'supportedLocales' => [
'en' => ['name' => 'English', 'script' => 'Latn', 'native' => 'English', 'regional' => 'en_GB'],
'de' => ['name' => 'German', 'script' => 'Latn', 'native' => 'Deutsch', 'regional' => 'de_DE']
],
'useAcceptLanguageHeader' => false,
'hideDefaultLocaleInURL' => trueAdditional context
Current caching documentation at https://github.com/mcamara/laravel-localization/blob/master/CACHING.md is incompatible with Laravel 11.