From fa6c0d3bd59a76e78b4e4d690876a40dd21a467c Mon Sep 17 00:00:00 2001 From: "WAME s.r.o" Date: Wed, 3 May 2023 12:47:43 +0200 Subject: [PATCH] Add condition --- src/PackageServiceProvider.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PackageServiceProvider.php b/src/PackageServiceProvider.php index 58a1b30..d4e0201 100644 --- a/src/PackageServiceProvider.php +++ b/src/PackageServiceProvider.php @@ -15,9 +15,11 @@ class PackageServiceProvider extends ServiceProvider */ public function boot() { - Helpers::copyDir(__DIR__ . '/../resources/lang/', resource_path('lang')); + if ($this->app->runningInConsole()) { + Helpers::copyDir(__DIR__ . '/../resources/lang/', resource_path('lang')); - $this->loadJSONTranslationsFrom(resource_path('lang')); + $this->loadJSONTranslationsFrom(resource_path('lang')); + } } }