Skip to content

Commit

Permalink
Meh, wrong side of the relation
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Sep 7, 2023
1 parent a23e837 commit 713955b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Foundation/Models/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ public function products(): MorphToMany

public function masterProducts(): MorphToMany
{
return $this->morphToMany(MasterProductProxy::modelClass(), 'channelables');
return $this->morphedByMany(MasterProductProxy::modelClass(), 'channelables');
}

public function shippingMethods(): MorphToMany
{
return $this->morphToMany(ShippingMethodProxy::modelClass(), 'channelables');
return $this->morphedByMany(ShippingMethodProxy::modelClass(), 'channelables');
}

public function paymentMethods(): MorphToMany
{
return $this->morphToMany(PaymentMethodProxy::modelClass(), 'channelables');
return $this->morphedByMany(PaymentMethodProxy::modelClass(), 'channelables');
}

public function taxonomies(): MorphToMany
{
return $this->morphToMany(TaxonomyProxy::modelClass(), 'channelables');
return $this->morphedByMany(TaxonomyProxy::modelClass(), 'channelables');
}

public function properties(): MorphToMany
{
return $this->morphToMany(PropertyProxy::modelClass(), 'channelables');
return $this->morphedByMany(PropertyProxy::modelClass(), 'channelables');
}
}

0 comments on commit 713955b

Please sign in to comment.