return error message directly when requested with POST

This commit is contained in:
printempw 2017-01-22 16:45:19 +08:00
parent 24137cf2a9
commit 233b2d4e39

View File

@ -108,6 +108,10 @@ class Handler extends ExceptionHandler
*/
protected function renderExceptionInBrief(Exception $e)
{
if ($_SERVER['REQUEST_METHOD'] == "GET") {
return response()->view('errors.exception', ['message' => $e->getMessage()]);
} else {
return $e->getMessage();
}
}
}