1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-23 14:57:46 +01:00

perf: Metti/ottieni elenco delle lingue e licenza nella cache

This commit is contained in:
Maicol Battistini 2021-11-10 17:14:22 +01:00
parent 706662d2ca
commit 357e36b067
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A

View File

@ -19,12 +19,11 @@ Route::redirect('/', 'setup');
// ----- INERTIA ROUTES ----- //
Route::inertia('setup', 'SetupPage', [
'languages' => array_map(
'languages' => cache()->rememberForever('app.languages', fn () => array_map(
static fn ($file) => basename($file, '.json'),
glob(resource_path('lang').'/*.json', GLOB_NOSORT)
),
'license' => file_get_contents(base_path('LICENSE')),
'title' => __('Configurazione'),
)),
'license' => cache()->rememberForever('app.license', fn () => file_get_contents(base_path('LICENSE'))),
]);
Route::get('lang/{language}', function ($language) {