Skip to content

Instantly share code, notes, and snippets.

@joaorobertopb
Last active February 14, 2017 01:01
Show Gist options
  • Save joaorobertopb/365a73a63882a26b564e89a49137139f to your computer and use it in GitHub Desktop.
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.
<?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