File tree 1 file changed +4
-17
lines changed
1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace Lio \Exceptions ;
3
3
4
+ use Auth ;
4
5
use Bugsnag ;
5
6
use Exception ;
6
- use Illuminate \Contracts \Auth \Guard ;
7
7
use Symfony \Component \HttpKernel \Exception \HttpException ;
8
8
use Bugsnag \BugsnagLaravel \BugsnagExceptionHandler as ExceptionHandler ;
9
9
10
10
class Handler extends ExceptionHandler
11
11
{
12
- /**
13
- * @var \Illuminate\Contracts\Auth\Guard
14
- */
15
- private $ auth ;
16
-
17
- /**
18
- * @param \Illuminate\Contracts\Auth\Guard $auth
19
- */
20
- public function __construct (Guard $ auth )
21
- {
22
- $ this ->auth = $ auth ;
23
- }
24
-
25
12
/**
26
13
* A list of the exception types that should not be reported.
27
14
*
@@ -42,10 +29,10 @@ public function __construct(Guard $auth)
42
29
public function report (Exception $ e )
43
30
{
44
31
// If a user is logged in, we'll set him as the target user for which the errors will occur.
45
- if ($ this -> auth -> check ()) {
32
+ if (Auth:: check ()) {
46
33
Bugsnag::setUser ([
47
- 'name ' => $ this -> auth -> user ()->name ,
48
- 'email ' => $ this -> auth -> user ()->email ,
34
+ 'name ' => Auth:: user ()->name ,
35
+ 'email ' => Auth:: user ()->email ,
49
36
]);
50
37
}
51
38
You can’t perform that action at this time.
0 commit comments