From fb6de57a454792833c96ffdcd4999c90468deb89 Mon Sep 17 00:00:00 2001 From: overtrue Date: Wed, 28 Apr 2021 11:36:48 +0800 Subject: [PATCH] bugfix. --- src/TranslationServiceProvider.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/TranslationServiceProvider.php b/src/TranslationServiceProvider.php index b5b244a..4caa192 100644 --- a/src/TranslationServiceProvider.php +++ b/src/TranslationServiceProvider.php @@ -56,8 +56,11 @@ protected function registerLoader() array_push($paths, base_path('resources/lang/')); } - return (new FileLoader($app['files'], $app['path.lang'], $paths)) - ->addJsonPath($jsonPath); + $loader = new FileLoader($app['files'], $app['path.lang'], $paths); + + $loader->addJsonPath($jsonPath); + + return $loader; }); }