@@ -37,12 +37,12 @@ |
||
37 | 37 | { |
38 | 38 | if ($event->user) { |
39 | 39 | $user = $event->user; |
40 | - if(method_exists($user, 'authentications')){ |
|
40 | + if (method_exists($user, 'authentications')) { |
|
41 | 41 | $ip = $this->request->ip(); |
42 | 42 | $userAgent = $this->request->userAgent(); |
43 | 43 | $authenticationLog = $user->authentications()->whereIpAddress($ip)->whereUserAgent($userAgent)->first(); |
44 | 44 | |
45 | - if (! $authenticationLog) { |
|
45 | + if (!$authenticationLog) { |
|
46 | 46 | $authenticationLog = new AuthenticationLog([ |
47 | 47 | 'ip_address' => $ip, |
48 | 48 | 'user_agent' => $userAgent, |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function handle(Login $event) |
38 | 38 | { |
39 | 39 | $user = $event->user; |
40 | - if(method_exists($user, 'authentications')){ |
|
40 | + if (method_exists($user, 'authentications')) { |
|
41 | 41 | $ip = $this->request->ip(); |
42 | 42 | $userAgent = $this->request->userAgent(); |
43 | 43 | $known = $user->authentications()->whereIpAddress($ip)->whereUserAgent($userAgent)->first(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | $user->authentications()->save($authenticationLog); |
53 | 53 | |
54 | - if (! $known && ! $newUser && config('authentication-log.notify')) { |
|
54 | + if (!$known && !$newUser && config('authentication-log.notify')) { |
|
55 | 55 | $user->notify(new NewDevice($authenticationLog)); |
56 | 56 | } |
57 | 57 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | if ($event->user) { |
39 | 39 | $user = $event->user; |
40 | - if(method_exists($user, 'authentications')){ |
|
40 | + if (method_exists($user, 'authentications')) { |
|
41 | 41 | $authenticationLog = $user->authentications()->whereNull('logout_at')->get()->skip(1); |
42 | 42 | |
43 | 43 | $user->authentications()->whereIn('id', $authenticationLog->pluck('id'))->update([ |