Skip to content

Commit

Permalink
DBP: Config publishing added.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ivanov committed Aug 2, 2017
1 parent 4857497 commit 371b1b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/DbProfilerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ private static function tickCounter()

public function boot()
{
$this->publish();

if (!$this->isEnabled()) {
return;
}
Expand Down Expand Up @@ -75,6 +77,12 @@ private function mergeConfig()
$this->mergeConfigFrom($this->getConfigPath(), 'db-profiler');
}

private function publish()
{
$path = $this->getConfigPath();
$this->publishes([$path => config_path('db-profiler.php')], 'config');
}

private function getConfigPath()
{
return __DIR__ . '/../config/db-profiler.php';
Expand Down

0 comments on commit 371b1b6

Please sign in to comment.