create crud product categories and partial update crud products with dealers stock
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user