From 713955b62d67ad743c0f76da52c411c5377c7071 Mon Sep 17 00:00:00 2001 From: Attila Fulop <1162360+fulopattila122@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:59:35 +0300 Subject: [PATCH] Meh, wrong side of the relation --- src/Foundation/Models/Channel.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Foundation/Models/Channel.php b/src/Foundation/Models/Channel.php index 49eab516..c7811873 100644 --- a/src/Foundation/Models/Channel.php +++ b/src/Foundation/Models/Channel.php @@ -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'); } }