fix edit products using new workflow mutations

This commit is contained in:
2025-06-12 17:15:06 +07:00
parent 1a01efb1b5
commit 58578532cc
7 changed files with 535 additions and 127 deletions

View File

@@ -41,4 +41,11 @@ class Dealer extends Model
{
return $this->hasMany(Stock::class);
}
public function products()
{
return $this->belongsToMany(Product::class, 'stocks', 'dealer_id', 'product_id')
->withPivot('quantity')
->withTimestamps();
}
}