Skip to content

Commit

Permalink
Allow supression of debug warning for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Dec 1, 2016
1 parent 68b9ffb commit 5bca1ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Middleware/CheckForDebug.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function handle($request, Closure $next)
{
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);
}

Expand Down
1 change: 1 addition & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/

'debug' => env('APP_DEBUG', false),
'warn_debug' => env('WARN_DEBUG', true),

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 5bca1ed

Please sign in to comment.