Skip to content

Commit

Permalink
Parsing created_at column
Browse files Browse the repository at this point in the history
  • Loading branch information
Moinuddin S. Khaja authored Jan 30, 2021
1 parent a3a7281 commit 7f25062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Listeners/LogSuccessfulLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function handle(Login $event)
$ip = $this->request->ip();
$userAgent = $this->request->userAgent();
$known = $user->auths()->whereIpAddress($ip)->whereUserAgent($userAgent)->first();
$newUser = $user->created_at->diffInMinutes(Carbon::now()) < 1;
$newUser = Carbon::parse($user->{$user->getCreatedAtColumn()})->diffInMinutes(Carbon::now()) < 1;

$authLogger = new AuthLogger([
'ip_address' => $ip,
Expand Down

0 comments on commit 7f25062

Please sign in to comment.