CartLine model should touch Cart parent timestamps #1313
adevade
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When adding a
CartLine
to the cart I think that theupdated_at
timestamp of theCart
should be automatically "touched". The same goes for other closely coupled relationships as well imo.Or do you think that is up to the developer to implement?
https://laravel.com/docs/10.x/eloquent-relationships#touching-parent-timestamps
class CartLine extends BaseModel { + protected $touches = ['cart']; public function cart() { return $this->belongsTo(Cart::class); } }
Beta Was this translation helpful? Give feedback.
All reactions