How to access specific intermediate table in case of multiple ManyToMany relationships in Laravel Eloquent relationship
I have a model Product, and the same product can be sold by multiple supermarkets and outlets, so I define two BelongsToMany relationships for them: class Product extends Model { public function supermarkets(): BelongsToMany { return $this->belongsToMany( Supermarket::class, 'product_supermarket', 'product_id',…