From 26a4198cbe2e9b02c19ad4fae62cd4b1ebe14a2b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 4 Mar 2023 11:00:52 +1100 Subject: [PATCH] Fixes for last login for clients --- app/Listeners/Contact/UpdateContactLastLogin.php | 2 +- app/Models/Client.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Listeners/Contact/UpdateContactLastLogin.php b/app/Listeners/Contact/UpdateContactLastLogin.php index 25f6a61fe668..efe0a8dadbda 100644 --- a/app/Listeners/Contact/UpdateContactLastLogin.php +++ b/app/Listeners/Contact/UpdateContactLastLogin.php @@ -40,6 +40,6 @@ class UpdateContactLastLogin implements ShouldQueue $client_contact->last_login = now(); $client_contact->client->last_login = now(); - $client_contact->save(); + $client_contact->push(); } } diff --git a/app/Models/Client.php b/app/Models/Client.php index 288e68c374da..f83d4fe0f24c 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -94,6 +94,7 @@ class Client extends BaseModel implements HasLocalePreference 'updated_at' => 'timestamp', 'created_at' => 'timestamp', 'deleted_at' => 'timestamp', + 'last_login' => 'timestamp', ]; protected $touches = [];