Skip to content

Commit

Permalink
Merge pull request #12 from rappasoft/develop
Browse files Browse the repository at this point in the history
v1.1.1
  • Loading branch information
rappasoft authored Oct 21, 2021
2 parents f252d05 + ec7fa08 commit 74fff58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to `Laravel Authentication Log` will be documented in this file.

### 1.1.1 - 2021-10-20

### Changed

- Logout listener bug fix - https://github.com/rappasoft/laravel-authentication-log/pull/10

### 1.1.0 - 2021-10-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/LogoutListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function handle(Logout $event): void
$user = $event->user;
$ip = $this->request->ip();
$userAgent = $this->request->userAgent();
$log = $user->authentications()->whereIpAddress($ip)->whereUserAgent($userAgent)->first();
$log = $user->authentications()->whereIpAddress($ip)->whereUserAgent($userAgent)->orderByDesc('login_at')->first();

if (! $log) {
$log = new AuthenticationLog([
Expand Down

0 comments on commit 74fff58

Please sign in to comment.