From 505e55d3029f1d63d885fd6b2467672890484c88 Mon Sep 17 00:00:00 2001 From: Febri Hidayan Date: Mon, 9 Aug 2021 08:49:31 +0700 Subject: [PATCH] wip --- src/Laratalk.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Laratalk.php b/src/Laratalk.php index 0a594ec..d8ec3ab 100644 --- a/src/Laratalk.php +++ b/src/Laratalk.php @@ -23,9 +23,13 @@ class Laratalk * @param string|null $locale * @return array */ - public static function availableTranslations(string $locale = null): array + public static function availableTranslations(?string $locale): array { - return trans('laratalk::app', [], $locale ?? FacadesConfig::get('app.locale')); + return trans( + 'laratalk::app', + [], + $locale ?? Auth::user()->{Config::userLocale()} + ); } /**