Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

orest's avatar
Level 13

date format conflict with elastic search when user logs out

When the timestamps is set to true , the date format looks like 2021-09-16T14:06:02.000000Z and this is the format that is stored in the elastic search index also.

However, when a user logs out, laravel disables the timestamps right before it updates the remember_token.

When the timestamps is set to false, the date format looks like 2021-09-16 11:37:49, which is different compared to the format that is stored in the index and this causes an error.

One way to solve this is of course is to set the $timestamps = false; in the User model, but then I will no longer have that information.

0 likes
0 replies

Please or to participate in this conversation.