mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 21:34:03 +00:00
585 B
585 B
| title | tweet_id | thread_slug | author_username | images | created_at | slug | |
|---|---|---|---|---|---|---|---|
| Use the $touches property to update the parent timestamp when a child is updated | 1502367773288468480 | weekly-thread-2022-10 | cosmeescobedo |
|
2022-03-11T19:36:04+00:00 | use-the-touches-property-to-update-the-parent-timestamp-when-a-child-is-updated |
🔥 #Laravel Did you know you can update the parent model timestamp when a child is updated?
If you have a "belongsTo" or "belongsToMany" relationship you can define a "$touches" property to do this.