search refactor3
This commit is contained in:
parent
763f45ade9
commit
846e1aa391
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
return [
|
||||
'meilisearch' => [
|
||||
'host' => env('MEILISEARCH_HOST', 'http://localhost:7700'),
|
||||
'key' => env('MEILISEARCH_KEY', null),
|
||||
'index-settings' => [
|
||||
\Webkul\Product\Models\ProductFlat::class => [
|
||||
'filterableAttributes'=> ['locale', 'channel' ],
|
||||
'sortableAttributes' => ['created_at'],
|
||||
// Other settings fields...
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -49,7 +49,10 @@ class ProductFlat extends Model implements ProductFlatContract
|
|||
{
|
||||
return 'products_index';
|
||||
}
|
||||
|
||||
public function searchable(): bool
|
||||
{
|
||||
return $this->status || $this->visible_individually;
|
||||
}
|
||||
/**
|
||||
* Get an attribute from the model.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue