Last active
February 14, 2017 01:01
-
-
Save joaorobertopb/365a73a63882a26b564e89a49137139f to your computer and use it in GitHub Desktop.
Vamos repassar as exceptions para o Whoops somente quando o ambiente for local e se o debug estiver ativo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Render an exception into an HTTP response. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @param \Exception $exception | |
* @return \Illuminate\Http\Response | |
*/ | |
public function render($request, Exception $exception) | |
{ | |
if (config('app.debug') && config('app.env') == 'local') { | |
return $this->renderExceptionWithWhoops($request, $exception); | |
} | |
return parent::render($request, $exception); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment