bugfixes
This commit is contained in:
parent
d84c9f9c8a
commit
50c7e9562b
@ -27,9 +27,6 @@ class LanguageService extends MediaService
|
||||
$langDir = $langPath . "/" . $data['code'];
|
||||
$appLangPath = storage_path('app/lang/default');
|
||||
|
||||
if (is_dir($langDir)) {
|
||||
throw new Exception("Language already exist");
|
||||
}
|
||||
|
||||
$groups = [
|
||||
'auth' => require storage_path('app/lang/groups/auth.php'),
|
||||
@ -53,9 +50,13 @@ class LanguageService extends MediaService
|
||||
}
|
||||
}
|
||||
|
||||
$alreadyExists = is_dir($langDir);
|
||||
|
||||
if (! $alreadyExists) {
|
||||
File::makeDirectory($langDir, 0777, true, true);
|
||||
File::copyDirectory($appLangPath, $langDir);
|
||||
}
|
||||
}
|
||||
|
||||
function updateLanguage($id, $data)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user