sources api
This commit is contained in:
parent
0516a4e4d3
commit
868602b580
|
|
@ -73,10 +73,11 @@ class SearchController extends V1Controller
|
|||
$products = $this->productFlatRepository->getModel()::search(implode(' OR ', $key))
|
||||
// ->where('channel', $channel)
|
||||
// ->where('locale', $locale)
|
||||
->where('status', 1)
|
||||
->where('visible_individually', 1)
|
||||
->take(50)
|
||||
->query(fn ($query) => $query->select('id','name','product_id','description')
|
||||
->where('status', 1)
|
||||
->where('visible_individually', 1)
|
||||
|
||||
// ->addSelect(DB::raw("\'product\' as type" ))
|
||||
->orderBy('name'))
|
||||
// ->take(10)
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ class ProductFlat extends Model implements ProductFlatContract
|
|||
'name' => $this->name,
|
||||
// 'meta_title' => $this->meta_title,
|
||||
'meta_keywords' => $this->meta_keywords,
|
||||
'status' => $this->status,
|
||||
'visible_individually' => $this->visible_individually
|
||||
];
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -461,8 +461,8 @@ class ProductRepository extends Repository
|
|||
$results = app(ProductFlatRepository::class)->getModel()::search(implode(' OR ', $queries))
|
||||
->where('status', 1)
|
||||
->where('visible_individually', 1)
|
||||
->where('channel', $channel)
|
||||
->where('locale', $locale)
|
||||
// ->where('channel', $channel)
|
||||
// ->where('locale', $locale)
|
||||
->orderBy('product_id', 'desc')
|
||||
->paginate(16);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue