2FAuth/app/Http/Middleware/SetLanguage.php
2022-03-31 11:24:01 +02:00

24 lines
433 B
PHP

<?php
namespace App\Http\Middleware;
use Closure;
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)
{
\App::setLocale(SettingService::get('lang', 'en'));
return $next($request);
}
}