sources api

This commit is contained in:
merdan 2022-09-29 17:41:14 +05:00
parent a504746c0f
commit afe4f858b8
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class SearchController extends V1Controller
$products = $this->productFlatRepository->getModel()::search(implode(' OR ', $key))
// ->where('channel', $channel)
// ->where('locale', $locale)
->take(100)
->take(50)
->query(fn ($query) => $query->select('id','name','product_id','description')
->where('status', 1)
->where('visible_individually', 1)

View File

@ -455,7 +455,7 @@ class ProductRepository extends Repository
->where('visible_individually', 1)
->orderBy('product_id', 'desc')
->paginate(16);
} elseif (config('scout.driver') == 'elastic') {
} elseif (config('scout.driver') == 'meilisearch') {
$queries = explode('_', $term);
$results = app(ProductFlatRepository::class)->getModel()::search(implode(' OR ', $queries))