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, action: "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?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire