diff --git a/src/Providers/LaravelInstallerServiceProvider.php b/src/Providers/LaravelInstallerServiceProvider.php index 0a81b83..9b4f166 100755 --- a/src/Providers/LaravelInstallerServiceProvider.php +++ b/src/Providers/LaravelInstallerServiceProvider.php @@ -57,8 +57,11 @@ protected function publishFiles() __DIR__.'/../Views' => base_path('resources/views/vendor/installer'), ], 'laravelinstaller'); + $laravelVersion = (int) app()->version(); + $langPath = $laravelVersion >= 9 ? app()->langPath() : base_path('resources/lang'); + $this->publishes([ - __DIR__.'/../Lang' => base_path('resources/lang'), + __DIR__.'/../Lang' => $langPath, ], 'laravelinstaller'); } }