mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
20 lines
372 B
PHP
20 lines
372 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use App;
|
|
use Session;
|
|
use Illuminate\Support\Arr;
|
|
|
|
class Internationalization
|
|
{
|
|
public function handle($request, \Closure $next)
|
|
{
|
|
if (Session::has('locale') && Arr::exists(config('locales'), session('locale'))) {
|
|
App::setLocale(Session::get('locale'));
|
|
}
|
|
|
|
return $next($request);
|
|
}
|
|
}
|