diff --git a/app/Http/Controllers/Admin/Settings/IndexController.php b/app/Http/Controllers/Admin/Settings/IndexController.php index 4408ebffdf..47c5674582 100644 --- a/app/Http/Controllers/Admin/Settings/IndexController.php +++ b/app/Http/Controllers/Admin/Settings/IndexController.php @@ -33,7 +33,7 @@ public function index(): View { return view('admin.settings.index', [ 'version' => $this->versionService, - 'languages' => $this->getAvailableLanguages(true), + 'languages' => $this->getAvailableLanguages(), ]); } diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 6e5e9f47fd..33ced4b752 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -60,7 +60,7 @@ public function index(Request $request): View public function create(): View { return view('admin.users.new', [ - 'languages' => $this->getAvailableLanguages(true), + 'languages' => $this->getAvailableLanguages(), ]); } @@ -71,7 +71,7 @@ public function view(User $user): View { return view('admin.users.view', [ 'user' => $user, - 'languages' => $this->getAvailableLanguages(true), + 'languages' => $this->getAvailableLanguages(), ]); } diff --git a/app/Traits/Helpers/AvailableLanguages.php b/app/Traits/Helpers/AvailableLanguages.php index 9b205c2287..cab5a76bae 100644 --- a/app/Traits/Helpers/AvailableLanguages.php +++ b/app/Traits/Helpers/AvailableLanguages.php @@ -13,9 +13,9 @@ trait AvailableLanguages * Return all the available languages on the Panel based on those * that are present in the language folder. */ - public function getAvailableLanguages(bool $localize = false): array + public function getAvailableLanguages(): array { - return collect($this->getFilesystemInstance()->directories(base_path('lang')))->mapWithKeys(function ($path) use ($localize) { + return collect($this->getFilesystemInstance()->directories(base_path('lang')))->mapWithKeys(function ($path) { $code = basename($path); $value = Locale::getDisplayName($code, app()->currentLocale());