From 59ed0465dee4216c0b34ac51f43907922edb1c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 22 Aug 2021 22:49:31 +0300 Subject: [PATCH] fixed config merge --- src/Providers/Laravel.php | 9 +++++++++ src/Providers/Main.php | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Providers/Laravel.php b/src/Providers/Laravel.php index 9cf7635..8d4c001 100644 --- a/src/Providers/Laravel.php +++ b/src/Providers/Laravel.php @@ -25,6 +25,7 @@ public function register() $this->registerServices(); $this->setupStubPath(); $this->registerProviders(); + $this->registerConfig(); } /** @@ -58,4 +59,12 @@ protected function registerServices() $this->app->alias(RepositoryInterface::class, 'module'); } + + /** + * Register module config. + */ + public function registerConfig() + { + $this->mergeConfigFrom(__DIR__ . '/../Config/module.php', 'module'); + } } diff --git a/src/Providers/Main.php b/src/Providers/Main.php index f873fa6..daef248 100644 --- a/src/Providers/Main.php +++ b/src/Providers/Main.php @@ -33,9 +33,7 @@ protected function registerModules() * Register package's namespaces. */ protected function registerNamespaces() - { - $this->mergeConfigFrom(__DIR__ . '/../Config/module.php', 'module'); - + { $this->publishes([ __DIR__ . '/../Config/module.php' => config_path('module.php'), ], 'module');