Skip to content

Commit

Permalink
fixed config merge
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Aug 22, 2021
1 parent ba87cad commit 59ed046
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/Providers/Laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function register()
$this->registerServices();
$this->setupStubPath();
$this->registerProviders();
$this->registerConfig();
}

/**
Expand Down Expand Up @@ -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');
}
}
4 changes: 1 addition & 3 deletions src/Providers/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 59ed046

Please sign in to comment.