diff --git a/Plugin.php b/Plugin.php index 1f59d89..eff76b7 100644 --- a/Plugin.php +++ b/Plugin.php @@ -1,9 +1,7 @@ alias('Debugbar', '\Barryvdh\Debugbar\Facade'); - // Register middleware if (Config::get('app.debugAjax', false)) { $this->app['Illuminate\Contracts\Http\Kernel']->pushMiddleware('\Winter\Debugbar\Middleware\InterpretsAjaxExceptions'); @@ -80,13 +68,21 @@ public function boot() } /** - * Register the + * Register the plugin */ public function register() { - /* - * Register asset bundles - */ + // Configure the debugbar + Config::set('debugbar', Config::get('winter.debugbar::config')); + + // Register the debugbar serviceprovider + $this->app->register(\Winter\Debugbar\Classes\ServiceProvider::class); + + // Register alias + $alias = AliasLoader::getInstance(); + $alias->alias('Debugbar', '\Barryvdh\Debugbar\Facade'); + + // Register asset bundles CombineAssets::registerCallback(function ($combiner) { $combiner->registerBundle('$/winter/debugbar/assets/css/debugbar.less'); });