From f78618a0ea1110aedfcbb98db7fecf657945baa2 Mon Sep 17 00:00:00 2001 From: Vaios Karampinis Date: Mon, 18 Feb 2019 21:51:47 +0200 Subject: [PATCH] Dont register routes and middleware if we are not in debug mode (#906) --- src/ServiceProvider.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 9078fe8e5..966a54746 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -63,6 +63,10 @@ function ($app) { */ public function boot() { + if (!$this->app['config']->get('app.debug')) { + return; + } + $configPath = __DIR__ . '/../config/debugbar.php'; $this->publishes([$configPath => $this->getConfigPath()], 'config');