Dont register routes and middleware if we are not in debug mode (#906)

This commit is contained in:
Vaios Karampinis 2019-02-18 21:51:47 +02:00 committed by Barry vd. Heuvel
parent ba046deba5
commit f78618a0ea
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider
*/
public function boot()
{
if (!$this->app['config']->get('app.debug')) {
return;
}
$configPath = __DIR__ . '/../config/debugbar.php';
$this->publishes([$configPath => $this->getConfigPath()], 'config');