File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3
3
namespace App \Exceptions ;
4
4
5
5
use Exception ;
6
+ use Illuminate \Auth \AuthenticationException ;
6
7
use Illuminate \Validation \ValidationException ;
7
8
use Illuminate \Auth \Access \AuthorizationException ;
8
9
use Illuminate \Database \Eloquent \ModelNotFoundException ;
@@ -17,12 +18,25 @@ class Handler extends ExceptionHandler
17
18
* @var array
18
19
*/
19
20
protected $ dontReport = [
21
+ AuthenticationException::class,
20
22
AuthorizationException::class,
21
23
HttpException::class,
22
24
ModelNotFoundException::class,
23
25
ValidationException::class,
24
26
];
25
27
28
+ /**
29
+ * Convert an authentication exception into an unauthenticated response.
30
+ *
31
+ * @param \Illuminate\Http\Request $request
32
+ * @param \Illuminate\Auth\AuthenticationException $e
33
+ * @return \Symfony\Component\HttpFoundation\Response
34
+ */
35
+ protected function unauthenticated ($ request , AuthenticationException $ e )
36
+ {
37
+ parent ::unauthenticated ($ request , $ e );
38
+ }
39
+
26
40
/**
27
41
* Report or log an exception.
28
42
*
You can’t perform that action at this time.
0 commit comments