File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider
17
17
public function boot ()
18
18
{
19
19
$ app = $ this ->app ;
20
- $ app ['config ' ]->package ('barryvdh/laravel-debugbar ' , __DIR__ . '/config ' );
20
+
21
+ $ this ->registerConfiguration ();
21
22
22
23
if ($ app ->runningInConsole ()) {
23
24
if ($ this ->app ['config ' ]->get ('laravel-debugbar::config.capture_console ' ) && method_exists ($ app , 'shutdown ' )) {
@@ -123,6 +124,21 @@ function ($app) {
123
124
$ this ->app ->middleware ('Barryvdh\Debugbar\Middleware\Stack ' , array ($ this ->app ));
124
125
}
125
126
}
127
+
128
+ /**
129
+ * Register configuration files, with L5 fallback
130
+ */
131
+ protected function registerConfiguration ()
132
+ {
133
+ // Is it possible to register the config?
134
+ if (method_exists ($ this ->app ['config ' ], 'package ' )) {
135
+ $ this ->app ['config ' ]->package ('barryvdh/laravel-debugbar ' , __DIR__ . '/config ' );
136
+ } else {
137
+ // Load the config for now..
138
+ $ config = $ this ->app ['files ' ]->getRequire (__DIR__ .'/config/config.php ' );
139
+ $ this ->app ['config ' ]->set ('laravel-debugbar::config ' , $ config );
140
+ }
141
+ }
126
142
127
143
/**
128
144
* Get the services provided by the provider.
You can’t perform that action at this time.
0 commit comments