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:
parent
706662d2ca
commit
357e36b067
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user