How Laravel updates the timestamps of the parent table
This article mainly introduces how Laravel updates the timestamps of the parent table, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Update the timestamps of the parent table
If you want to update the timestamps of the parent table while updating the associated table, you only need to add the touches attribute to the model of the associated table.
For example, we have two correlation models, Post and Comment.