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
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
1 changed files with 1 additions and 1 deletions

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 [];
}