Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Feb 13, 2024
1 parent ce49d33 commit cf94821
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
10 changes: 0 additions & 10 deletions src/Models/CategoryPivot.php

This file was deleted.

5 changes: 2 additions & 3 deletions src/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public function getMorphClass(): string
*/
public function categories(): BelongsToMany
{
return $this->belongsToMany(Category::getProxiedClass(), 'bazar_category_product')
->using(CategoryPivot::class);
return $this->belongsToMany(Category::getProxiedClass(), 'bazar_category_product');
}

/**
Expand Down Expand Up @@ -134,7 +133,7 @@ function (QueryBuilder $query): QueryBuilder {
return $query->selectRaw('count(*)')
->from('bazar_buyable_property_value')
->whereIn('bazar_buyable_property_value.buyable_id', $this->variants()->select('bazar_variants.id'))
->where('bazar_buyable_property_value.buyable_type', Variant::class);
->where('bazar_buyable_property_value.buyable_type', Variant::getProxiedClass());
}
)
->first();
Expand Down

0 comments on commit cf94821

Please sign in to comment.