Skip to content

Commit 92405f1

Browse files
committed
throw the exceptions, they will render the views
1 parent 082ab44 commit 92405f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/Exceptions/AccessDeniedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class AccessDeniedException extends Exception
1414
*/
1515
public function render($request)
1616
{
17-
return response(view('errors.403', ['exception' => $this]), 403);
17+
return abort(403, $this->getMessage());
1818
}
1919
}

src/app/Exceptions/BackpackProRequiredException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public function render($request)
2020
break;
2121
}
2222

23-
return response(view('errors.500', ['exception' => $this]), 500);
23+
return abort(500, $this->getMessage());
2424
}
2525
}

0 commit comments

Comments
 (0)