Skip to content

Commit

Permalink
Merge pull request #8270 from ladybirdweb/analysis-o7NRQp
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
bhanu2217 authored Oct 30, 2023
2 parents 75b3079 + 6a5b564 commit dc1917b
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions app/Http/Controllers/Client/helpdesk/UnAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ public static function changeLanguage($lang)
// return Cache::get('language');
// } else return 'false';
// Cache::put('language',$);
$path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
// dd(array_key_exists($lang, Config::get('languages')));
// app()->setLocale($lang);
$path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
// dd(array_key_exists($lang, Config::get('languages')));
// app()->setLocale($lang);

\Cache::forever('language', $lang);
// dd(Cache::get('language'));
Expand All @@ -352,19 +352,19 @@ public static function changeLanguage($lang)

return true;

/* $path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
if (Auth::check()) {
$id = Auth::user()->id;
$user = User::find($id);
$user->user_language = $lang;
$user->save();
} else {
Session::put('language', $lang);
}
}
return redirect()->back();*/
/* $path = base_path('lang'); // Path to check available language packages
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
if (Auth::check()) {
$id = Auth::user()->id;
$user = User::find($id);
$user->user_language = $lang;
$user->save();
} else {
Session::put('language', $lang);
}
}
return redirect()->back();*/
}

// Follow up tickets
Expand Down

0 comments on commit dc1917b

Please sign in to comment.