auto-detect locale based on browser preferences

This commit is contained in:
hackerESQ
2024-08-23 14:24:15 -05:00
parent 2a8f7e3b55
commit aa2f84d72c
3 changed files with 30 additions and 1 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
<?php
use App\Http\Middleware\SetLocale;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
@@ -12,7 +13,7 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
$middleware->append(SetLocale::class);
})
->withExceptions(function (Exceptions $exceptions) {
//