Running the Patched PHP 8.3.36 on Ubuntu 20.04 Servers With Docker
PHP fixed the two critical vulnerabilities CVE-2026-109618 and CVE-2026-109619 on October 21, 2026, in PHP 8.3.36 and the matching 8.2.35, 8.4.27 and…
When building a multi-language Laravel application with Jetstream and Fortify, you might notice that the authentication, profile, and team management routes don't automatically inherit your localization configuration. Here's how to fix that and ensure all your routes support both language URL prefixes and localization middleware.
By default, Jetstream and Fortify automatically register their routes during the application bootstrap process. This means these routes are registered before you can wrap them in your localization group. As a result, URLs like /login, /register, /user/profile, and team management pages won't have language prefixes like /en/login or /de/register, nor will they be processed by your localization middleware.
The solution involves three simple steps:
First, modify your JetstreamServiceProvider and FortifyServiceProvider to prevent automatic route registration:
// app/Providers/JetstreamServiceProvider.php
public function register()
{
Jetstream::ignoreRoutes();
}
// app/Providers/FortifyServiceProvider.php
public function register()
{
Fortify::ignoreRoutes();
}
Now, update your routes/web.php file to import the Jetstream and Fortify routes within a route group that includes both the language prefix and localization middleware:
<?php
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
Route::group([
'prefix' => LaravelLocalization::setLocale(), // Adds language code to URL
'middleware' => ['localize'] // Handles locale detection and setting
], function () {
// Import Jetstream routes
require base_path('vendor/laravel/jetstream/routes/inertia.php');
// Import Fortify routes
require base_path('vendor/laravel/fortify/routes/routes.php');
// Your other routes...
});
Now all your routes, including authentication, profile management, and team management pages, will have:
For example:
/en/login/de/register/fr/user/profile/es/teams/createGive Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com