Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
Fix: Can't loading default package configuration file when configuration
file in application's own config directory is not exists
  • Loading branch information
JackieDo committed May 17, 2017
1 parent 22c1d9a commit 3b1e888
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Jackiedo/DotenvEditor/DotenvEditorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,16 @@ class DotenvEditorServiceProvider extends ServiceProvider
*/
public function boot()
{
$packageConfigPath = __DIR__ . '/../../config/config.php';

/**
* Loading and publishing package's config
*/
$config = config_path('dotenv-editor.php');
$packageConfigPath = __DIR__ . '/../../config/config.php';
$appConfigPath = config_path('dotenv-editor.php');

if (file_exists($config)) {
$this->mergeConfigFrom($packageConfigPath, 'dotenv-editor');
}
$this->mergeConfigFrom($packageConfigPath, 'dotenv-editor');

$this->publishes([
$packageConfigPath => $config,
$packageConfigPath => $appConfigPath,
], 'config');
}

Expand Down

0 comments on commit 3b1e888

Please sign in to comment.