mirror of
https://github.com/v2board/v2board.git
synced 2024-11-14 07:29:13 +08:00
18 lines
332 B
PHP
18 lines
332 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Middleware;
|
||
|
|
||
|
use Closure;
|
||
|
use Illuminate\Support\Facades\App;
|
||
|
|
||
|
class Language
|
||
|
{
|
||
|
public function handle($request, Closure $next)
|
||
|
{
|
||
|
if ($request->header('content-language')) {
|
||
|
App::setLocale($request->header('content-language'));
|
||
|
}
|
||
|
return $next($request);
|
||
|
}
|
||
|
}
|