Removed the use of Auth facade and removed unnecesary option
This commit is contained in:
parent
3bb9e5e8a8
commit
e9ac014bf4
3 changed files with 1 additions and 8 deletions
|
@ -7,9 +7,7 @@ APP_CLEAR_TASKLOG=720
|
|||
APP_DELETE_MINUTES=10
|
||||
APP_ENVIRONMENT_ONLY=true
|
||||
LOG_CHANNEL=daily
|
||||
|
||||
APP_LOCALE=en
|
||||
APP_LOCALE_IS_GLOBAL=false
|
||||
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
|
|
|
@ -48,11 +48,7 @@ class LanguageMiddleware
|
|||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (! Auth::check() || $this->config->get('pterodactyl.lang.global')) {
|
||||
$this->app->setLocale($this->config->get('app.locale', 'en'));
|
||||
} else {
|
||||
$this->app->setLocale(Auth::user()->language);
|
||||
}
|
||||
$this->app->setLocale($request->user()->language ?? $this->config->get('app.locale'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
|
|
@ -161,7 +161,6 @@ return [
|
|||
*/
|
||||
'lang' => [
|
||||
'in_context' => env('PHRASE_IN_CONTEXT', false),
|
||||
'global' => env('APP_LOCALE_IS_GLOBAL', false),
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue