File tree Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -547,30 +547,29 @@ You can catch these exceptions inside `app/Exceptions/Handler.php` file and do w
547
547
* Render an exception into an HTTP response.
548
548
*
549
549
* @param \Illuminate\Http\Request $request
550
- * @param \Exception $exception
550
+ * @param \Throwable $e
551
551
* @return \Illuminate\Http\Response
552
552
*/
553
- public function render($request, Exception $exception)
554
- {
555
-
556
- $userLevelCheck = $exception instanceof \jeremykenedy\LaravelRoles\App\Exceptions\RoleDeniedException ||
557
- $exception instanceof \jeremykenedy\LaravelRoles\App\Exceptions\PermissionDeniedException ||
558
- $exception instanceof \jeremykenedy\LaravelRoles\App\Exceptions\LevelDeniedException;
559
-
560
- if ($userLevelCheck) {
561
-
562
- if ($request->expectsJson()) {
563
- return Response::json(array(
564
- 'error' => 403,
565
- 'message' => 'Unauthorized.'
566
- ), 403);
567
- }
568
-
569
- abort(403);
570
- }
571
-
572
- return parent::render($request, $exception);
573
- }
553
+ public function render($request, Throwable $e)
554
+ {
555
+ $userLevelCheck = $e instanceof \jeremykenedy\LaravelRoles\App\Exceptions\RoleDeniedException ||
556
+ $e instanceof \jeremykenedy\LaravelRoles\App\Exceptions\PermissionDeniedException ||
557
+ $e instanceof \jeremykenedy\LaravelRoles\App\Exceptions\LevelDeniedException;
558
+
559
+ if ($userLevelCheck) {
560
+
561
+ if ($request->expectsJson()) {
562
+ return Response::json(array(
563
+ 'error' => 403,
564
+ 'message' => 'Unauthorized.'
565
+ ), 403);
566
+ }
567
+
568
+ abort(403);
569
+ }
570
+
571
+ return parent::render($request, $e);
572
+ }
574
573
```
575
574
576
575
---
You can’t perform that action at this time.
0 commit comments