Code refactoring

This commit is contained in:
EnesSacid-Buker
2023-02-15 23:08:28 +03:00
committed by GitHub
parent c1604d4a3e
commit aa7c82074c
2 changed files with 7 additions and 3 deletions

View File

@ -15,10 +15,14 @@ class Language extends Controller
public function create()
{
$locale = config('app.locale');
if (!$locale || !array_key_exists($locale, language()->allowed())) {
$lang_allowed = language()->allowed();
if (! $locale || ! array_key_exists($locale, $lang_allowed)) {
$locale = 'en-GB';
}
return view('install.language.create')->with(['locale' => $locale]);
return view('install.language.create', compact('locale', 'lang_allowed'));
}
/**