jeudi 29 novembre 2018

How to update other columns alongside remember_token when logging out?

I have noticed that when logging out, laravel automatically sets remember_token value in the user table as evidenced from the screenshot from laravel-debugbar.

enter image description here

As you may have noticed from the screenshot is that am also setting the last_login column for the particular user that is logging out.

Problem is that as seen from the screenshot, it is running two update statements, one right after another not just one.

So is there way i can setup my application so i can run just one update statement when logging out so it can set the last_login, remember_token and updated_at in the user table for that particular user.

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire