çategory searç

This commit is contained in:
merdan 2022-09-30 12:56:55 +05:00
parent 59e3289532
commit 26df5dd8d1
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ class SearchController extends V1Controller
private function searchCategories(){
$key = request('search');
$categories = CategoryTranslationProxy::modelClass()::select('category_id as id','description','meta_title as name')
$categories = CategoryTranslationProxy::modelClass()::select('category_id as id','meta_title as name')
->where('locale', core()->getRequestedLocaleCode())
->where('name', 'like', '%'.$key.'%')
->orWhere('meta_title', 'like', '%'.$key.'%')

View File

@ -39,7 +39,7 @@ class UpdateMeilisearchIndex extends Command
*/
public function handle()
{
$client = new Client(env('MEILISEARCH_HOST','http://127.0.0.1:7700'),env('MEILISEARCH_KEY','Y0urVery-S3cureAp1K3y'));
$client = new Meilisearch\Client(env('MEILISEARCH_HOST','http://127.0.0.1:7700'),env('MEILISEARCH_KEY','Y0urVery-S3cureAp1K3y'));
$this->updateSortableAttributes($client);