From 5bca1ed2b6701f90c59f24499b1ed659edffe454 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 1 Dec 2016 00:48:43 -0800 Subject: [PATCH] Allow supression of debug warning for demo --- app/Http/Middleware/CheckForDebug.php | 2 +- config/app.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/CheckForDebug.php b/app/Http/Middleware/CheckForDebug.php index 43a89f25cb..2486f20120 100644 --- a/app/Http/Middleware/CheckForDebug.php +++ b/app/Http/Middleware/CheckForDebug.php @@ -18,7 +18,7 @@ class CheckForDebug { view()->share('debug_in_production', false); - if (((Auth::check() && (Auth::user()->isSuperUser()))) && (app()->environment()=='production') && (config('app.debug')===true)) { + if (((Auth::check() && (Auth::user()->isSuperUser()))) && (app()->environment()=='production') && (config('app.warn_debug')===true) && (config('app.debug')===true)) { view()->share('debug_in_production', true); } diff --git a/config/app.php b/config/app.php index a54c267f6d..753a568228 100755 --- a/config/app.php +++ b/config/app.php @@ -27,6 +27,7 @@ return [ */ 'debug' => env('APP_DEBUG', false), + 'warn_debug' => env('WARN_DEBUG', true), /* |--------------------------------------------------------------------------