From 371b1b6a856cb3dd0ba5e69523fa403aacb1f46e Mon Sep 17 00:00:00 2001 From: Dmitry Ivanov Date: Wed, 2 Aug 2017 16:47:23 +0300 Subject: [PATCH] DBP: Config publishing added. --- src/DbProfilerServiceProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/DbProfilerServiceProvider.php b/src/DbProfilerServiceProvider.php index dc0d8de..4aa5e7a 100644 --- a/src/DbProfilerServiceProvider.php +++ b/src/DbProfilerServiceProvider.php @@ -22,6 +22,8 @@ private static function tickCounter() public function boot() { + $this->publish(); + if (!$this->isEnabled()) { return; } @@ -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';