create crud product categories and partial update crud products with dealers stock

This commit is contained in:
2025-05-28 18:24:44 +07:00
parent 80375d8af3
commit 59e23ae535
28 changed files with 1336 additions and 28 deletions

View File

@@ -22,4 +22,10 @@ class Dealer extends Model
{
return $this->hasMany(Transaction::class, 'dealer_id', 'id');
}
public function products(){
return $this->belongsToMany(Product::class, 'stock')
->withPivot('quantity')
->withTimestamps();
}
}