2FAuth/app/Http/Middleware/SetLanguage.php

24 lines
433 B
PHP
Raw Normal View History

<?php
namespace App\Http\Middleware;
use Closure;
2021-12-01 13:47:20 +01:00
use Facades\App\Services\SettingService;
class SetLanguage
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
2021-12-01 13:47:20 +01:00
\App::setLocale(SettingService::get('lang', 'en'));
return $next($request);
}
}