mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +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);
|
||
|
}
|
||
|
}
|