diff --git a/app/Services/Helpers/LanguageService.php b/app/Services/Helpers/LanguageService.php index a1ff5498bc..1a4d86444d 100644 --- a/app/Services/Helpers/LanguageService.php +++ b/app/Services/Helpers/LanguageService.php @@ -2,8 +2,7 @@ namespace App\Services\Helpers; -use Illuminate\Container\Attributes\Storage; -use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Facades\File; use Locale; class LanguageService @@ -25,8 +24,6 @@ class LanguageService 'tr', ]; - public function __construct(#[Storage('local')] protected Filesystem $filesystem) {} - public function isLanguageTranslated(string $countryCode = 'en'): bool { return in_array($countryCode, self::TRANSLATED_COMPLETELY, true); @@ -34,7 +31,7 @@ public function isLanguageTranslated(string $countryCode = 'en'): bool public function getAvailableLanguages(string $path = 'lang'): array { - return collect($this->filesystem->directories(base_path($path)))->mapWithKeys(function ($path) { + return collect(File::directories(base_path($path)))->mapWithKeys(function ($path) { $code = basename($path); return [$code => title_case(Locale::getDisplayName($code, $code))];