diff --git a/models/Category.php b/models/Category.php index 87e591b..04f978f 100755 --- a/models/Category.php +++ b/models/Category.php @@ -160,7 +160,7 @@ public function getProducts() { return $this->hasMany(Product::className(), [ 'id' => 'product_id' ]) - ->viaTable('product_category', [ 'category_id' => 'id' ])->inverseOf('categories'); + ->viaTable('product_category', [ 'category_id' => 'id' ]); } /** -- libgit2 0.21.4