Skip to content

Instantly share code, notes, and snippets.

@jonphipps
Last active February 7, 2016 21:24
Show Gist options
  • Save jonphipps/31a86fb4a4152158060b to your computer and use it in GitHub Desktop.
Save jonphipps/31a86fb4a4152158060b to your computer and use it in GitHub Desktop.
app/Exceptions/Handler.php
<?php
...
if ($request->ajax()) {
$whoops->pushHandler(new \Whoops\Handler\JsonResponseHandler());
} else {
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment