fix for undefined property in SetupController [fixes #3774]

This commit is contained in:
Diego Souza 2019-09-08 04:07:23 -03:00
parent e8fb2b78a5
commit f800c3a76d

View File

@ -134,18 +134,21 @@ class SetupController extends Controller
*/
public function getIndex()
{
$supportedLanguages = Request::getLanguages();
$requestedLanguages = Request::getLanguages();
$userLanguage = Config::get('app.locale');
$langs = Config::get('langs');
foreach ($supportedLanguages as $language) {
foreach ($requestedLanguages as $language) {
$language = str_replace('_', '-', $language);
if (isset($this->langs[$language])) {
if (isset($langs[$language])) {
$userLanguage = $language;
break;
}
}
app('translator')->setLocale($userLanguage);
// Since .env may already be configured, we should show that data!
$cacheConfig = [
'driver' => Config::get('cache.default'),