dimanche 24 mai 2020

Laravel: Best way to create logs to a User table?

I have a Users table and I want to add a field to the table that has an array of logs and each log as a timestamp and action, so basically:

[ {created_at: 1590357784, action: "Logged In"}, {created_at: 1590357734, actin: "Changed Password"} ]

I was thinking of adding a json field to the data ( $table->json('user_logs')->nullable();) but would this be sufficient to achieve this?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3ghP8Kc
via IFTTT

Aucun commentaire:

Enregistrer un commentaire