diff --git a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php index 77dcf7f..18114b3 100644 --- a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php +++ b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php @@ -31,7 +31,7 @@ public function boot() __DIR__.'/../../views' => base_path('/resources/views/vendor/laravel-log-viewer'), ], 'views'); $this->publishes([ - __DIR__.'/../../config/logviewer.php' => config_path('logviewer.php'), + __DIR__.'/../../config/logviewer.php' => $this->config_path('logviewer.php'), ]); } @@ -56,5 +56,16 @@ public function provides() { return array(); } + + /** + * Get the configuration path. + * + * @param string $path + * @return string + */ + private function config_path($path = '') + { + return function_exists('config_path') ? config_path($path) : app()->basePath() . DIRECTORY_SEPARATOR . 'config' . ($path ? DIRECTORY_SEPARATOR . $path : $path); + } }