setup wizard update

This commit is contained in:
Čarodej
2022-08-05 09:34:24 +02:00
parent 49abb58776
commit d1ecd33838
6 changed files with 15178 additions and 201 deletions
@@ -9,20 +9,13 @@ class SeedDefaultLanguageTranslationsAction
string $license,
string $locale
): void {
$translations = [
'extended' => collect([
config('language-translations.extended'),
config('language-translations.regular'),
config('custom-language-translations'),
])->collapse(),
'regular' => collect([
config('language-translations.regular'),
config('custom-language-translations'),
])->collapse(),
];
$translations = $translations[strtolower($license)]
->map(fn ($value, $key) => [
$translations = collect([
config('language-translations.extended'),
config('language-translations.regular'),
config('custom-language-translations'),
])
->collapse()
->map(fn($value, $key) => [
'lang' => $locale,
'value' => $value,
'key' => $key,
@@ -14,7 +14,7 @@ class SeedDefaultSettingsAction
): void {
// Set default settings
collect(
config('content.content.' . strtolower($license))
config('content.content')
)->each(fn ($content) => Setting::updateOrCreate([
'name' => $content['name'],
], [