1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

perf: Cambiata funzione in modo da essere più performante

Motivo: Inspection EA Ultimate e [is_file or file_exists in PHP](https://stackoverflow.com/a/792909)
This commit is contained in:
Maicol Battistini
2021-08-26 20:07:51 +02:00
parent 18c9c22c22
commit c0054373dc

View File

@@ -38,7 +38,7 @@ class HandleInertiaRequests extends Middleware
'locale' => fn () => app()->getLocale(),
'translations' => function () {
$json = resource_path('lang/'.app()->getLocale().'.json');
if (!file_exists($json)) {
if (!is_file($json)) {
return [];
}