Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jbenner-radham/a60c8579f9cf70f017de to your computer and use it in GitHub Desktop.
Save jbenner-radham/a60c8579f9cf70f017de to your computer and use it in GitHub Desktop.
<?php
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
if (config('app.debug') && $request->wantsJson()) {
return self::renderJson($e);
}
return parent::render($request, $e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment