Skip to content

Commit 134eafd

Browse files
committed
remove things that aren't usually customized
1 parent 3966348 commit 134eafd

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

app/Exceptions/Handler.php

-31
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace App\Exceptions;
44

55
use Exception;
6-
use Illuminate\Auth\AuthenticationException;
7-
use Illuminate\Validation\ValidationException;
86
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
97

108
class Handler extends ExceptionHandler
@@ -52,33 +50,4 @@ public function render($request, Exception $exception)
5250
{
5351
return parent::render($request, $exception);
5452
}
55-
56-
/**
57-
* Convert a validation exception into a JSON response.
58-
*
59-
* @param \Illuminate\Http\Request $request
60-
* @param \Illuminate\Validation\ValidationException $exception
61-
* @return \Illuminate\Http\JsonResponse
62-
*/
63-
protected function invalidJson($request, ValidationException $exception)
64-
{
65-
return response()->json([
66-
'message' => $exception->getMessage(),
67-
'errors' => $exception->errors(),
68-
], $exception->status);
69-
}
70-
71-
/**
72-
* Convert an authentication exception into a response.
73-
*
74-
* @param \Illuminate\Http\Request $request
75-
* @param \Illuminate\Auth\AuthenticationException $exception
76-
* @return \Illuminate\Http\Response
77-
*/
78-
protected function unauthenticated($request, AuthenticationException $exception)
79-
{
80-
return $request->expectsJson()
81-
? response()->json(['message' => 'Unauthenticated.'], 401)
82-
: redirect()->guest(route('login'));
83-
}
8453
}

0 commit comments

Comments
 (0)