Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cydrobolt/polr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Exceptions/Handler.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index e1b16ba..4229462 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -60,11 +60,15 @@ class Handler extends ExceptionHandler {
if ($status_code == 500) {
// Render a nice error page for 500s
- return view('errors.500');
+ return response(view('errors.500'), 500);
}
else {
// If not 500, render generic page
- return response(view('errors.generic', ['status_code' => $status_code, 'status_message' => $status_message]), $status_code);
+ return response(
+ view('errors.generic', [
+ 'status_code' => $status_code,
+ 'status_message' => $status_message
+ ]), $status_code);
}
}
if ($e instanceof ApiException) {