-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to push packages name/key to config repository.
Signed-off-by: crynobone <crynobone@gmail.com>
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
<?php namespace Orchestra\Support\Providers; | ||
|
||
use Orchestra\Contracts\Config\PackageRepository; | ||
use Orchestra\Support\Providers\Traits\PackageProviderTrait; | ||
use Illuminate\Support\ServiceProvider as BaseServiceProvider; | ||
|
||
abstract class ServiceProvider extends BaseServiceProvider | ||
{ | ||
use PackageProviderTrait; | ||
|
||
/** | ||
* Merge the given configuration with the existing configuration. | ||
* | ||
* @param string $path | ||
* @param string $key | ||
* @return void | ||
*/ | ||
protected function mergeConfigFrom($path, $key) | ||
{ | ||
parent::mergeConfigFrom($path, $key); | ||
|
||
$config = $this->app['config']; | ||
|
||
if ($config instanceof PackageRepository) { | ||
$config->file($key); | ||
} | ||
} | ||
} |