title: Laravel- How to update all child when parent is changed?
body: <p>[I'm looking for best practice to handle]</p>
  <p>I have data structure like below:</p>
  <pre><code>Category Class
  
  protected $fillable = [
     'id', 'price', 'name'
  
  ];
  
  public function products()
  {
     return $this-&gt;hasMany(Product::class, 'category_id');
  }
  
  Product Class 
  
  protected $fillable = [
     'category_id', 'price' 
  ];
  
  public function category
  {
    return $this-&gt;belongsTo(Category::class, 'category_id');
  }
  </code></pre>
  <p><strong>Let's say I updated price at category. So, I want to update all price in product that related to this category table it will update same price as category as well.</strong></p>