refactor: streamline active product retrieval by utilizing query builder for improved clarity and maintainability
This commit is contained in:
parent
f38f61fe45
commit
d8a403daa9
@ -55,7 +55,8 @@ public function inactive(Builder $query): void
|
|||||||
|
|
||||||
public static function getActiveWithVariantsAndCategories(): Collection
|
public static function getActiveWithVariantsAndCategories(): Collection
|
||||||
{
|
{
|
||||||
return self::active()
|
return self::query()
|
||||||
|
->active()
|
||||||
->with([
|
->with([
|
||||||
'categories',
|
'categories',
|
||||||
'variants' => fn ($query) => $query
|
'variants' => fn ($query) => $query
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user