mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-25 14:14:42 +00:00
- chunking translations query
This commit is contained in:
@@ -34,8 +34,12 @@ class LanguageService
|
|||||||
];
|
];
|
||||||
})->toArray();
|
})->toArray();
|
||||||
|
|
||||||
DB::table('language_translations')
|
$chunks = array_chunk($translations, 100);
|
||||||
->insert($translations);
|
|
||||||
|
foreach ($chunks as $chunk) {
|
||||||
|
DB::table('language_translations')
|
||||||
|
->insert($chunk);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,9 +85,14 @@ class LanguageService
|
|||||||
];
|
];
|
||||||
})->toArray();
|
})->toArray();
|
||||||
|
|
||||||
// Store translations into database
|
$chunks = array_chunk($translations, 100);
|
||||||
DB::table('language_translations')
|
|
||||||
->insert($translations);
|
foreach ($chunks as $chunk) {
|
||||||
|
|
||||||
|
// Store translations into database
|
||||||
|
DB::table('language_translations')
|
||||||
|
->insert($chunk);
|
||||||
|
}
|
||||||
|
|
||||||
// Flush cache
|
// Flush cache
|
||||||
cache()->forget("language-translations-$locale");
|
cache()->forget("language-translations-$locale");
|
||||||
|
|||||||
Generated
+336
-329
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user