diff --git a/src/Mariuzzo/LaravelJsLocalization/Generators/LangJsGenerator.php b/src/Mariuzzo/LaravelJsLocalization/Generators/LangJsGenerator.php index d756989..9a11e46 100644 --- a/src/Mariuzzo/LaravelJsLocalization/Generators/LangJsGenerator.php +++ b/src/Mariuzzo/LaravelJsLocalization/Generators/LangJsGenerator.php @@ -6,6 +6,7 @@ use Illuminate\Filesystem\Filesystem as File; use Illuminate\Support\Str; use JShrink\Minifier; +use Illuminate\Support\Arr; /** * The LangJsGenerator class. @@ -146,7 +147,7 @@ protected function getMessages($noSort) $fullPath = $path.DIRECTORY_SEPARATOR.$pathName; if ($extension == 'php') { - $messages[$key] = include $fullPath; + Arr::set($messages, $key, include $fullPath); } else { $key = $key.$this->stringsDomain; $fileContent = file_get_contents($fullPath);